anchit
What is Wrapper class in dot net?
By anchit in C# on May 27 2012
  • Smrati Gupta
    Jun, 2018 28

    A wrapper class is any class which "wraps" or "encapsulates" the functionality of another class or component. for eg:-class Wrapper //Wrapper Class{class InnerClass //Inner Class{public Int32 ProcessData(int Val){return Val + 1;}}public Int32 CallRapper(){Wrapper.InnerClass wpr = new Wrapper.InnerClass(); // Internally call to Wrapper class.return wpr.ProcessData(100);}}class Program{static void Main(string[] args){Wrapper w = new Wrapper();Console.WriteLine("Data Process by inner class and show by Wrapper Class:-" + w.CallRapper());Console.ReadLine();}}

    • 0
  • Smrati Gupta
    Jun, 2018 28

    A wrapper class is any class which "wraps" or "encapsulates" the functionality of another class or component. for eg:-class Wrapper //Wrapper Class{class InnerClass //Inner Class{public Int32 ProcessData(int Val){return Val + 1;}}public Int32 CallRapper(){Wrapper.InnerClass wpr = new Wrapper.InnerClass(); // Internally call to Wrapper class.return wpr.ProcessData(100);}}class Program{static void Main(string[] args){Wrapper w = new Wrapper();Console.WriteLine("Data Process by inner class and show by Wrapper Class:-" + w.CallRapper());Console.ReadLine();}}

    • 0
  • Smrati Gupta
    Jun, 2018 28

    A wrapper class is any class which "wraps" or "encapsulates" the functionality of another class or component. for eg:-class Wrapper //Wrapper Class{class InnerClass //Inner Class{public Int32 ProcessData(int Val){return Val + 1;}}public Int32 CallRapper(){Wrapper.InnerClass wpr = new Wrapper.InnerClass(); // Internally call to Wrapper class.return wpr.ProcessData(100);}}class Program{static void Main(string[] args){Wrapper w = new Wrapper();Console.WriteLine("Data Process by inner class and show by Wrapper Class:-" + w.CallRapper());Console.ReadLine();}}

    • 0
  • Raminaidu  Bandi
    Jun, 2012 11

    //I am naming a class Wrapper //BaseClass is the name of class that's there in your vendor's dll public class Wrapper : BaseClass {//create constructors with no param or with params depending on what kind of constructors you have in vendor's dll and what you needpublic Wrapper () { base.BaseClass()}//create a function that you needpublic string function ReturnObject(){//do your stuff here//call methods from vendor's dll} }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS