Gets a MemberInfo object representing a field or a property of the specified target with the specified name.
Namespace:
Novalys.VisualGuard.SecurityAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
| C# |
|---|
public static MemberInfo GetFieldOrPropertyInfo( Type target, string fieldName ) |
| Visual Basic (Declaration) |
|---|
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
A MemberInfo object representing the field or the property , if found; otherwise, null.
Examples
MenberInfo info = VGReflectionHelper.GetFieldOrPropertyInfo(typeof(Form1), "userControl1.button1");