|
-
Jun 20th, 2006, 11:59 PM
#1
Thread Starter
Lively Member
[2.0] Wrapper Class
dear friends
Can any body tell me what is a wrapper class.Do we have those classes in C# and is it possible to use those VC++ wrapper classes in C#.plz tell me.
Thanks for sparing time for me.
cheers
kishore
-
Jun 21st, 2006, 12:09 AM
#2
Re: [2.0] Wrapper Class
A wrapper class is a class that wraps another class, i.e. it hides the details of the other class and provides a generally simplified interface to the user. An example of the use of wrapper classes is in COM Interop. When you reference an ActiveX control or other COM object in your .NET code you are actually interacting with a .NET wrapper that has been created for you so that you don't have to interact directly with the unmanaged class.
-
Jun 21st, 2006, 01:15 AM
#3
Thread Starter
Lively Member
Re: [2.0] Wrapper Class
thank you jmcilhinney
could u please give me one example.i have a vc++ wrapper class can i use it?ho to use a wrapper class in c#
regards
kishore
Last edited by vkkishore_s; Jun 21st, 2006 at 01:19 AM.
Reason: corerction
-
Jun 21st, 2006, 02:31 AM
#4
Re: [2.0] Wrapper Class
A class is a class. There's nothing special about a wrapper class. If you define a class that allows the user to interact with another class. An example is my ZIP class in the VB.NET CodeBank. It provides a small number of very easy to use methods that allow the user to compress and extract files and folders from ZIP archives. It doesn't do any of the grunt work itself though. It wraps the #ZipLib library, hiding the complexity of that library from the user behind a simple interface.
As for a class written in C++, you cannot use it directly in a C# project. You can compile it into its own library and then reference that in your project but each .NET project can only use a single language.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|