HI, I have a class1 and Class2 which is generic class and when i create object for class2 which should be able to acces class1 method which is MethodA() please advise.Thanks in advance

namespace generics1
{
    public class B
    {
       public void methodA()
        {


        }

    }
    public class A<T>
    {
        public void methodB()
        {
            base.MemberwiseClone();

        }

    }
    class Program
    {
        static void Main(string[] args)
        {
            A<B> obj = new A<B>();

        }
    }
}

Class2 should inherit Class1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.