Vidyalelo
C# Programming · Q52

Functions and Methods in C Sharp

Programming · C# Programming · question 52

Q52

What will be the output of the following C# code snippet? class equality public int x; public int y; public Boolean isequal() return (x == y); class Program static void Main(string[] args) equality obj = new equality(); obj.x = 5; obj.y = 5; Console.WriteLine(obj.isequal()); Console.ReadLine();

A.
false
B.
true
Answer
C.
0
D.
1

Answer: Option B

Solution

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