Type::IsVisible Property
.NET Framework (current version)
Gets a value indicating whether the Type can be accessed by code outside the assembly.
Assembly: mscorlib (in mscorlib.dll)
Use this property to determine whether a type is part of the public interface of a component assembly.
The following code example tests two classes, only one of which is visible outside the assembly.
using namespace System; private ref class InternalOnly { public: ref class Nested {}; }; public ref class Example { public: ref class Nested {}; }; // Entry point of example int main() { Type^ classType = InternalOnly::Nested::typeid; Console::WriteLine( "Is the {0} class visible outside the assembly? {1}", classType->FullName, classType->IsVisible); classType = Example::Nested::typeid; Console::WriteLine( "Is the {0} class visible outside the assembly? {1}", classType->FullName, classType->IsVisible); } /* This example produces the following output: Is the InternalOnly+Nested class visible outside the assembly? False Is the Example+Nested class visible outside the assembly? True */
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: