Click here to Skip to main content
15,881,821 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All

Can any one explain what is WRAPPER class and method and what is the use of these and hot to implement in my asp.net web application



Thank's in advance
Posted
Updated 12-Nov-17 18:54pm
Comments
Volynsky Alex 5-Jun-13 18:45pm    
Hi Aslam!
The idea of wrapper classes is generally to mimic structure, but simply hide complexity/advanced/unwanted functionality.
Read more here.:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/83323469-dbab-4312-819c-0ace89f6583f

Regards,
Alex.

1 solution

A wrapper class is any class which "wraps" or "encapsulates" the functionality of another class or component. This provides a level of abstraction from the implementation of the underlying class and "hides" the implementation from the outside world.
For example, if you write a music player, you would probably have a Track class which handles where it is on disk, the band name, album, and so forth. But you would also want a playlist: which could be a List<Track> quite easily. But it might make more sense to create a "wrapper" class called Playlist which contains a list of tracks, but exposes the Add and Remove methods, which also has a name and knows how to save / load itself to disk. Because the actual List is hidden from the outside world, they can't change the content without you knowing about it and being aware that the list needs to be saved.
 
Share this answer
 
Comments
Member 11105818 26-Nov-14 23:28pm    
Any one can be ex-plane,How to create wrapper class in real time project???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900