Hi,
I created a class name -InterestedCompany.cs
namespace TestingProject
{
class InterestedCompany
{
string interests;
public string Interests
{
get { return interests; }
set { interests = value; }
}
}
}
I have one more class name - Student.cs
namespace TestingProject
{
class Student :Person
{
InterestedCompany x;
internal InterestedCompany X
{
get { return x; }
set { x = value; }
}
}
}
in the main form I try to do
InitializeComponent();
Student v = new Student();
v.X.Interests = "x";
but i get run time error why ?
how can i access into insertcompany ?