Click to See Complete Forum and Search --> : C# equivalent of Library
salman108
August 3rd, 2006, 06:12 AM
just Wodering, What would be a C# equivalent to a code library ....
I am new to C#, all i know is C++ ....
So if i want to package some code, say network side, or DB side, like in C++ library, or a COM based dll ...
What would be the equivalent in C# / . Net ??
:confused:
Shuja Ali
August 3rd, 2006, 06:19 AM
You need to create a Class Library project in Visual Studio to create a COM DLL.
salman108
August 3rd, 2006, 06:38 AM
-- Shuja.
What i meant to ask is, I not only want to make a COM DLL... that comes with it's own threading models and all .....
I want to make a library, a code library .... say i wrap some class, and expose a library once.
Now i can use that library in any N number of applications .....
creatorul
August 3rd, 2006, 06:47 AM
Like Shuja said you have to make Class Library to create a DLL <b>for .NET</b>. The library can be used from .NET languages ( C#, VB.NET, managed C++) .
If you are interested in COM interoperability with .NET you have to understand the following: If you want to access a COM component with a .NET client you have to work with RCW ( runtime callable wrapper). If you want to access a .NET component from a COM client application you have to work with CCW( COM callable wrapper ). CCW wraps .NET component and offers what a COM client expects from a COM object ( IDispach , IUnknown etc).
Shuja Ali
August 3rd, 2006, 06:48 AM
This is exactly what you can do in a Class Library project. You create a Library of Classes and compile it. Then all your classes will be available from that Library in all the applications.
salman108
August 3rd, 2006, 07:43 AM
Ahhhhh .... GOT IT !!
Thanks a lot guys !!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.