|
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.IsNestedPublic Propriedade
.NET Framework 2.0
Assembly: mscorlib (em mscorlib. dll)
Valor da propriedade
Tipo: System.BooleanImplementa
_Type.IsNestedPublicusing System; // Enclose a class. public class MyClassA { // Public nested class. public class MyClassB { } public static void Main(string[] args) { // Get the type of the nested class. Type myTypeB = typeof(MyClassA.MyClassB); // Get the IsNestedPublic property of the nested class. Console.WriteLine("\nThe IsNestedPublic property value of the nested class is {0}.", myTypeB.IsNestedPublic.ToString()); } }
import System.*;
// Enclose a class.
public class MyClassA
{
// Public nested class.
public class MyClassB
{
} //MyClassB
public static void main(String[] args)
{
// Get the type of the nested class.
Type myTypeB = MyClassA.MyClassB.class.ToType();
// Get the IsNestedPublic property of the nested class.
Console.WriteLine("\nThe IsNestedPublic property value of the nested"
+ " class is {0}.", System.Convert.ToString(
myTypeB.get_IsNestedPublic()));
} //main
} //MyClassA