Call a static method in a nested namespace. : MethodInfo « Reflection « C# / C Sharp
- C# / C Sharp
- Reflection
- MethodInfo
Call a static method in a nested namespace.
using System;
namespace SomeNameSpace
{
public class MyClass
{
static void Main()
{
Nested.NestedNameSpaceClass.SayHello();
}
}
// a nested namespace
namespace Nested
{
public class NestedNameSpaceClass
{
public static void SayHello()
{
Console.WriteLine("Hello");
}
}
}
}
Related examples in the same category