C# supports of .NET

  • Thread starter Thread starter Eitan
  • Start date Start date
E

Eitan

Hello,

I'd like to know whether C# supports COM objects, ActiveX ?

Does this behaviour takes much different then old fashions visual studio C
versions ?

Need sample code, please.

Thanks :)
 
Eitan,

.NET supports the use of ActiveX controls and COM objects from within
it. Some things are slightly different (for example, you have garbage
collection in .NET, so you have to be aware of when you release your COM
objects and do it explicitly, also, there is a perf overhead for making COM
calls, etc, etc), but it is supported a great deal.

You can also create COM objects (as well as ActiveX controls, but they
are not supported) as well. The model for this is a little different
depending on your background. If you are used to using ATL to create your
COM objects, then the .NET way will be much easier, and welcome (IMO). If
you are coming from a VB background, and don't know about things like GUIDs,
IIDs, and the like, you might find it more daunting.

For more information on how to use COM objects in .NET as well as author
types in .NET for COM, check out the section of the .NET framework
documentation titled "COM Interoperability in Visual Basic and Visual C#",
located at (watch for line wrap):

http://msdn.microsoft.com/library/d.../html/vbconcominteropinvisualbasicvisualc.asp

Hope this helps.
 
Back
Top