Difference between classes and structure {plz give up vote} | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Difference between classes and structure {plz give up vote}

23rd Aug 2016, 11:03 AM
Nabarup Ghosh
Nabarup Ghosh - avatar
2 Answers
+ 4
Class and Structure are almost same. Differences are as following. 1. Classes are reference type. 2. Structures are value type. Value type copied and pass the value to new variable or method when you assign/call. Reference type pass the reference of single instance to new variable or method.
23rd Aug 2016, 11:26 AM
Aung Thuya
Aung Thuya - avatar
+ 3
thx
23rd Aug 2016, 11:59 AM
Nabarup Ghosh
Nabarup Ghosh - avatar