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();
}
Loading
VulpesPosted Aug 28, 2012, 9:00 AM
However, there are other types such as structs, enums, interfaces, delegates, arrays and pointers in C#.
int, double etc are aliases for Int32, Double etc which are structs in the .NET framework.
Posted Aug 28, 2012, 9:02 AM