0

Fill in the blanks to create an auto-property named Age of type int.

The below code I'm not sure what to put. class Dog { public int Age { I'M NOT SURE WHAT TO PUT HERE set; } }

7th Nov 2017, 4:59 PM
Cole Lynam
Cole Lynam - avatar
2 Answers
+ 1
I'm no good with C#, but as I see it, your class doesn't have any member variable that is encapsulated by the property, not sure what to return on the getter part. No worries, loads of C# coders here, just wait a bit.
7th Nov 2017, 5:15 PM
Ipang
0
class Dog { public int Age { get;set; } }
6th Mar 2018, 3:41 PM
Mahnoor Shahzad
Mahnoor Shahzad - avatar