2
Reply

Class and Type

Maha

Maha

Aug 28 2012 8:54 AM
997
Please tell me whether class can be considered as a type (int, double & so on). In the 2nd example shows Student type and payingStudent variable.

1)
public static void Main()
{
         Student payingStudent = new Student();
}

2)
public static void Main()
{
         Student payingStudent;

         payingStudent = new Student();
}


Answers (2)