Results 1 to 4 of 4

Thread: [2.0] Wrapper Class

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    116

    [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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    116

    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

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width