1.

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

A. 1, 3
B. 2, 4, 5
C. 4 only
D. 3, 5
Answer» C. 4 only


Discussion

No Comment Found