C# beginner question

Add-in Express™ Support Service
That's what is more important than anything else

C# beginner question
Thomas Grossen

Posts: 134
Joined: 2005-10-21

How do you add an event in the C# code? (for example the adxOutlookEvents_ItemSend()?) Is there something automatic, like in VB, or do you have to write the procedure header?

The Add-in Express demos in VB are very good to start; the same in C# will be very useful

Please understand that I am a C++ back-end developer, and front-end C# is new for me :)

By the way, does somebody know a good website to quick learn C#?


Posted 27 Oct, 2005 04:52:50 Top
Sergey Grischenko

Add-in Express team

Posts: 7224
Joined: 2004-07-05
Hi, Thomas.

Actually in C# you can use the following syntax to add events:
OutlookApp.ItemSend += new Outlook.ApplicationEvents_ItemSendEventHandler(this.MyEventHandler());

The second way is to use the UCOMIConnectionPoint and UCOMIConnectionPointContainer .NET classes to connect to all events at the same time. We use the second way. It is more convenience but a little complicated. To learn how we do this see the ADX source code (ADXAddinModule.cs file).

As for a good website, you can find a lot of C# code on codeproject.com:
Posted 27 Oct, 2005 08:34:17 Top