+ 1

is int is strut

3rd Nov 2016, 12:14 PM
prem kumar
prem kumar - avatar
2 odpowiedzi
+ 9
No, int is a keyword. It is used to declare/create variables as being able to store integer values. struct is used to encapsulate (or store in short) variables, methods, etc. For example : struct Car //Car is a struct, inside the '{}' is what it stores/encapsulate { int BatteryPower; //BatteryPower is a variable, int is the keyword being used to declare/create it }
3rd Nov 2016, 12:59 PM
Wen Qin
Wen Qin - avatar
0
int is a keyword which aliases the type System.Int32 which is a struct.
3rd Nov 2016, 10:15 PM
Michael Dolence