|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Type.IsNestedPrivate Propriedade
.NET Framework 2.0
Assembly: mscorlib (em mscorlib. dll)
Valor da propriedade
Tipo: System.BooleanImplementa
_Type.IsNestedPrivateusing System; // Outer class. public class MyClassA { // Private nested class. private class MyClassB { } public static void Main(string[] args) { // Get the type of the nested class. Type myTypeB = typeof(MyClassA.MyClassB); // Get the IsNestedPrivate property of the nested class. Console.WriteLine("\nThe IsNestedPrivate property value of the nested class is {0}.", myTypeB.IsNestedPrivate.ToString()); } }
import System.*;
// Outer class.
public class MyClassA
{
// Private nested class.
private class MyClassB
{
} //MyClassB
public static void main(String[] args)
{
// Get the type of the nested class.
Type myTypeB = MyClassA.MyClassB.class.ToType();
// Get the IsNestedPrivate property of the nested class.
Console.WriteLine("\nThe IsNestedPrivate property value of the nested"
+" class is {0}.",
System.Convert.ToString(myTypeB.get_IsNestedPrivate()));
} //main
} //MyClassA