title: Reflection get type of FieldInfo object?
body: <p>HI All,
  I need to access the class <strong>SomeClass</strong> which is declared has a private field in the Wrapper class, using Reflection so far i have been able to get private field members . How do i cast it back to its original type so that i could access it properties and other members.</p>
  
  <pre><code>internal class Program
      {
          private static void Main(string[] args)
          {
              Wrapper wrap = new Wrapper
              {
                  SOmeProperty = new SomeClass
                  {
                      Number = 007
                  }
              };
  
              Type type = wrap.GetType();
              FieldInfo[] infos = type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
  
              foreach (var item in infos)
              {
              }
          }
      }
  
      internal class SomeClass
      {
          public int Number { get; set; }
      }
  
      internal class Wrapper
      {
          private SomeClass _tempSomeObj;
  
          public SomeClass SOmeProperty
          {
              get
              {
                  return _tempSomeObj;
              }
              set
              {
                  _tempSomeObj = value;
              }
          }
      }
  </code></pre>