IL には の概念がなくinternal
、内部クラスはprivate
、ルート名前空間にあるかassembly
、別の型にネストされているかのように表現されます。
namespace ConsoleApplication1
{
internal class ExplicitInternal
{
private class ExplicitPrivate
{
}
internal class ExplicitNestedInternal
{
}
public class ExplicitNestedPublic
{
}
}
public class ExplicitPublic
{
}
class ImplicitInternal
{
private class ImplicitPrivate
{
}
}
}
になる
.namespace ConsoleApplication1
{
.class private auto ansi beforefieldinit ConsoleApplication1.ExplicitInternal
extends [mscorlib]System.Object
{
.class nested private auto ansi beforefieldinit ExplicitPrivate
extends [mscorlib]System.Object
{
}
.class nested assembly auto ansi beforefieldinit ExplicitNestedInternal
extends [mscorlib]System.Object
{
}
.class nested public auto ansi beforefieldinit ExplicitNestedPublic
extends [mscorlib]System.Object
{
}
}
.class public auto ansi beforefieldinit ConsoleApplication1.ExplicitPublic
extends [mscorlib]System.Object
{
}
.class private auto ansi beforefieldinit ConsoleApplication1.ImplicitInternal
extends [mscorlib]System.Object
{
.class nested private auto ansi beforefieldinit ImplicitPrivate
extends [mscorlib]System.Object
{
}
}
}