C# Programming - Properties - Discussion

Discussion Forum : Properties - General Questions (Q.No. 10)
If Sample class has a Length property with set accessor then which of the following statements will work correctly?
Sample m = new Sample(); 
int l;
l = m.Length;
Sample m = new Sample(); 
m.Length = m.Length + 20;
Sample.Length = 20;
Console.WriteLine (Sample.Length);
Sample m = new Sample(); 
m.Length = 10;
Answer: Option
No answer description is available. Let's discuss.
1 comments Page 1 of 1.

Rishabh said:   8 years ago
Why A and B are not correct?

Post your comments here:

Your comments will be displayed after verification.