Click or drag to resize
PropertyInfoGetGetMethod Method (Boolean)
When overridden in a derived class, returns the public or non-public get accessor for this property.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public abstract MethodInfo GetGetMethod(
	bool nonPublic
)

Parameters

nonPublic
Type: SystemBoolean
Indicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false.

Return Value

Type: MethodInfo
A MethodInfo object representing the get accessor for this property, if nonPublic is true. Returns null if nonPublic is false and the get accessor is non-public, or if nonPublic is true but no get accessors exist.
Exceptions
ExceptionCondition
SecurityExceptionThe requested method is non-public and the caller does not have ReflectionPermission to reflect on this non-public method.
See Also