Type::IsPublic Property
Gets a value indicating whether the Type is declared public.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System::Booleantrue if the Type is declared public and is not a nested type; otherwise, false.
Do not use with nested types; use IsNestedPublic instead.
If the current Type represents a type parameter of a generic type, this property returns true.
TypeAttributes::VisibilityMask selects the visibility attributes.
The following example creates an instance of MyTestClass, checks for the IsPublic property, and displays the result.
For nested classes, ignore the results of the IsPublic and IsNotPublic properties and use IsNestedPublic, IsNestedPrivate, IsNestedFamORAssem, and so on.
Note: |
|---|
To run this example, see Building Examples That Use a Demo Method and a TextBlock Control. |
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Note: