Gets a MemberInfo object representing a field or a property of the specified target with the specified name.

Namespace: Novalys.VisualGuard.Security
Assembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2016.0.105.16 (2016.0.105.16)

Syntax

C#
public static MemberInfo GetFieldOrPropertyInfo(
	Type target,
	string fieldName
)
Visual Basic
Public Shared Function GetFieldOrPropertyInfo ( 
	target As Type,
	fieldName As String
) As MemberInfo

Parameters

target
Type: System..::..Type
The object whose field will be returned
fieldName
Type: System..::..String
A string containing the name of field in dotted-quad notation(e.g. fieldname.subfieldname.subfieldname).

Return Value

Type: MemberInfo
A MemberInfo object representing the field or the property , if found; otherwise, null.

Examples

C# Copy imageCopy
MenberInfo info = VGReflectionHelper.GetFieldOrPropertyInfo(typeof(Form1), "userControl1.button1");

See Also