Reflection on nested Types
In this chapter you will learn:
Obtaining nested types
To retrieve nested types, call GetNestedTypes
on the containing type.
For example:
using System;//from ja v a 2 s . com
using System.Reflection;
using System.Collections.Generic;
class MainClass
{
static void Main()
{
foreach (Type t in typeof(System.Environment).GetNestedTypes())
Console.WriteLine(t.FullName);
}
}
The output:
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Reflection