Gurjeet Singh

Gurjeet Singh

  • NA
  • 90
  • 94.7k

Multiple Inheritance is not working

Aug 13 2011 7:59 AM

I have tried to inherit two classes in one class. I want to know how can inherit more than one class.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

 

/// <summary>

/// Summary description for ParentClass

/// </summary>

public class ParentClass

{

    private int _id;

    public int Id

    {

        get { return _id; }

        set { _id = value; }

    }

       public ParentClass()

       {

       }

}

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

 

/// <summary>

/// Summary description for InheritanceClass2

/// </summary>

public class InheritanceClass2

{

    private string _location;

    public string Location

    {

        get { return _location; }

        set { _location = value; }

    }

 

       public InheritanceClass2()

       {

       }

}

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Data;

using System.Data.SqlClient;

using System.Web.Configuration;

 

public class InhetianceClass1_ : ParentClass, InheritanceClass2

{

 

 

But about code not show inheritanceclass2 in intellisense. What should I do?

 


Answers (1)