Why I am not able to access S class method? And why am I able to create the method with the same name in class M?
public class S
{
public S()
{
}
public int myFunc(int a, int b)
{
return a + b;
}
}
public class M:S
{
public M()
{
}
public string myFunc(int a, int b)
{
return (a + b).ToString();
}
}
public class Test
{
public static void Main(string[] args)
{
M mm = new M();
mm.myFunc(1,2); // Why I am not able to access S class myFunc
}
}