+ 1
Can anybody explain the use of get in C# in detail ?
4 Respuestas
+ 2
Get works like a method.
when you want to read the value of the property get method will call.
(value) keyword returns the value of the assign field. you can process on some fields in GET and return the value you want
+ 1
It returns the value that you have assigned to a variable. For example you say int x = 10. When you use get x you will take 10(so it returns you the value of x) . It took me 2 years to understand it but now I believe it is simple.
0
Thanks everyone