What will be the output of the following code snippet ?

using System;

namespace DemoOne
{
public class Base
{
private int intMember = 50;

public void Display()
{
Console.WriteLine("Result is " + intMember);
}
}
}
namespace DemoTwo
{
public class Base
{
private int intMember = 60;

public void Display()
{
Console.WriteLine("Result is " + intMember);
}

public static void Main(string[] args)
{
DemoOne.Base baseObj = new DemoOne.Base();
baseObj.Display();
}
}
}

Result is 50
Result is 60
Result is 0
Incorrect access of Display method
Correct Option - a

To get all Infosys Certified L1 Junior Microsoft .NET Programmer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in