+ 1

Can anybody explain the use of get in C# in detail ?

25th Apr 2020, 2:01 PM
Aritra pal
Aritra pal - avatar
3 Answers
+ 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
27th Apr 2020, 7:02 AM
Ali pishkari
Ali pishkari - avatar
+ 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.
30th Apr 2020, 8:36 AM
NICK ISPANOPOULOS
0
Thanks everyone
1st May 2020, 11:53 AM
Aritra pal
Aritra pal - avatar