Vidyalelo
C# Programming · Q107

Exception Handling in C Sharp

Programming · C# Programming · question 107

Q107

Consider a class maths and we had a property called a sum.b is a reference to a maths object and we want the statement b.sum = 10 to fail. Which of the following is the correct solution to ensure this functionality?

A.
Declare sum property with both get and set accessors
B.
Declare sum property with only get accessor
C.
Declare sum property with get, set and normal accessors
Answer
D.
None of the mentioned

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board