live user chart 221 users on this page
0 views

Verified Question

If Sample class has a Length property with get and set accessors then which of the following statements will work correctly
Sample.Length = 20;
Sample m = new Sample();
m.Length = 10;
Console.WriteLine(Sample.Length);
Sample m = new Sample();
int len;
len = m.Length;
Sample m = new Sample();
m.Length = m.Length + 20;

Answer is "2, 4, 5"

Comments and Discussions

You don't need to login to post your comment

Gabriella • via iOS
🌐 India

give solution please

Victoria • via iOS
🌐 India

can anyone share the explanation, please?