4
Answers

Class - member initialization

Photo of Allen sabuhi

Allen sabuhi

15y
6.1k
1
Hi there, I am wondering what the difference is in the following 2 classes. Thanks
Class X
{
int i = 10;
}


Class X
{
int i;
public X()
{
i = 10;
}
}

Answers (4)