TypeInfo::GetDeclaredField Method

.NET Framework 4.6 and 4.5

Returns an object that represents the specified public field declared by the current type.

Namespace:  System.Reflection
Assemblies:   System.Reflection (in System.Reflection.dll)
  mscorlib (in mscorlib.dll)

public:
virtual FieldInfo^ GetDeclaredField(
	String^ name
)

Parameters

name
Type: System::String

The name of the field.

Return Value

Type: System.Reflection::FieldInfo
An object that represents the specified field, if found; otherwise, nullptr.

ExceptionCondition
ArgumentNullException

name is nullptr.

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft