tags:

views:

414

answers:

3

I am bit unclear in using IUnknown interface .Is IUnknown interface only meant to work with COM /COM + Objects and some unmanaged codes like Win APIs ?

+2  A: 

In context of C# and .NET - yes. You should use IUnknown only for COM.

Restuta
+2  A: 

IUnknown is a COM/COM+ interface. Its not used natively by .NET languages such as C#.

AnthonyWJones
+3  A: 

COM interfaces are used primarily by unmanaged code. If you need the C# you are writing to interoperate with unmanaged code, you can export it as COM interfaces:

COM Interop with C#

IUnknown is generally the base class for COM objects.

Drew Hoskins
+1. Just one note, you can scratch the "generally", all COM object must implement IUnknown
Binary Worrier