Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

  1. Consider a class maths and we had a property called as sum.b which is the reference to a maths object and we want the statement Console.WriteLine(b.sum)to fail.Which among the following is the correct solution to ensure this functionality?
  2. A.
    Declares sum property with only get accessor
    B.
    Declares sum property with only set accessor
    C.
    Declares sum property with both set and get accessor
    D.
    Declares sum property with both set, get and normal accessor

    View Answer

    Workspace

    Answer : Option B

    Explanation :



Be The First To Comment