System.Type.IsPublic Property

Gets a value indicating whether the Type is declared public.

Syntax

public bool IsPublic { get; }

Value

true if the top-level Type is declared public; otherwise, false.

Remarks

Do not use with nested types; use Type.IsNestedPublic instead.

If the current Type represents a type parameter of a generic type, this property returns true.

System.Reflection.TypeAttributes.VisibilityMask selects the visibility attributes.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0