How to create a derived class from a class in a class librar

How to create a derived class from a class in a class library if you don’t have access to the library’s source code in C# ?

Solution

Sure, C# will support that. Take a look at this example that uses theSystem.Collections.Generic.Dictionary as the base class.

accepted

Sure, C# will support that. Take a look at this example that uses theSystem.Collections.Generic.Dictionary as the base class.

      public class MyDictionary : Dictionary<string, int> { }    public class MyMain  {      public MyMain()      {          MyDictionary dictionary = new MyDictionary();          dictionary.Add(\"hello\", 1);      }  }  
How to create a derived class from a class in a class library if you don’t have access to the library’s source code in C# ?Solution Sure, C# will support that.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site