ReflectionExtensions.GetField C# (CSharp) Method

GetField() public static method

public static GetField ( this type, string fieldName ) : FieldInfo
type this
fieldName string
return FieldInfo
    public static FieldInfo GetField(this Type type, string fieldName)
    {
        return type.GetRuntimeField(fieldName);
    }

Usage Example

Ejemplo n.º 1
0
        public void ReflectionExtensionsGetField()
        {
            tlog.Debug(tag, $"ReflectionExtensionsGetField START");

            try
            {
                TypeImplement type = new TypeImplement();

                ReflectionExtensions.GetField(type, "myName");
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                tlog.Debug(tag, $"ReflectionExtensionsGetField END (OK)");
                Assert.Pass("Caught Exception : passed!");
            }
        }
All Usage Examples Of ReflectionExtensions::GetField