Which operator is used to access variables/fields inside a class in C#?

73. Which operator is used to access variables/fields inside a class in C#?

  1. Arrow Operator (->)
  2. Dot Operator (.)
  3. Greater Than (>)
  4. Dot and Greater Than (.>)

Answer: B) Dot Operator (.)

Explanation:

The dot (.) symbol (or dot operator) is used to access variables/fields in a class in C#.

Syntax:

Class_Name.Variable_Name/Field_Name;

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.