Skip to content

TypeExtensions.IsPublic Method ​

Definition ​

Returns true if the type is public, nested or not, that is, its Accessibility is Public; false otherwise.

c#
public static bool IsPublic(this Type type);

View source

Parameters ​

NameTypeDescription
typeTypeThe type.

Returns ​

Boolean

true if the type is Public; false otherwise.

Remarks ​

Differs from IsPublic; that property returns false if the type is nested, this method returns true for nested types.