CSharp examples for System.Reflection:FieldInfo
Get Value from FieldInfo
using System.Reflection; using System.Collections.Generic; using System;/*w w w . j a v a2 s .com*/ public class Main{ public static object GetValue(FieldInfo field, object @object) { object value = field.GetValue(@object); return (field.FieldType.IsEnum) ? (int) value : value; } }