Не возвращает метод - C#
Формулировка задачи:
Добрый день
почему метод GetMethods() ничего не возвращает ?
class A
{
public int X { get; set; }
public virtual void Meth()
{
Console.WriteLine("Базовый метод");
}
}
class B : A
{
public int Y { get; set; }
public override void Meth()
{
Console.WriteLine("Переопределенный метод");
}
public int test(int a)
{
return a + 10;
}
}
class Program
{
static void Main(string[] args)
{
B b = new B();
Type t = typeof(B);
MethodInfo[] m = t.GetMethods(BindingFlags.Public);
foreach (MethodInfo mt in m)
{
Console.WriteLine(mt.ReturnType.Name + " " + mt.Name);
}
Console.ReadKey();
}
}Решение задачи: «Не возвращает метод»
textual
Листинг программы
public int test(int a)