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: 2017.0.101.17 (2017.0.101.17)
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: MemberInfoA MemberInfo object representing the field or the property , if found; otherwise, null.
Examples
C# | Copy |
---|---|
MenberInfo info = VGReflectionHelper.GetFieldOrPropertyInfo(typeof(Form1), "userControl1.button1"); |