Visual Guard Class Library Documentation

VGReflectionHelper.GetFieldOrPropertyInfo Method 

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

public static MemberInfo GetFieldOrPropertyInfo(
   Type target,
   String fieldName
);

Parameters

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

Return Value

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

Example

MenberInfo info = VGReflectionHelper.GetFieldOrPropertyInfo(typeof(Form1), "userControl1.button1");

See Also

VGReflectionHelper Class | Novalys.VisualGuard.Security Namespace