2
Answers

Default access modifier

Ask a question
Maha

Maha

11y
955
1
I wish to know whether following highlighted method headers have a default access modifier. Is there any way to find out default access modifier?

using System;
class CreateEmployee
{
static void Main()
{
Employee myAssistant = new Employee();

myAssistant.SetId(345);

Console.WriteLine("ID # is {0}", myAssistant.GetId());

Console.ReadKey();
}
}

class Employee
{
int idNumber;

public int GetId()
{
return idNumber;
}
public void SetId(int id)
{
idNumber = id;
}
}


Answers (2)