System.Object.GetFieldInfo C# (CSharp) Method

GetFieldInfo() private method

private GetFieldInfo ( String typeName, String fieldName ) : System.Reflection.FieldInfo
typeName String
fieldName String
return System.Reflection.FieldInfo
    private FieldInfo GetFieldInfo(String typeName, String fieldName)
    {
        Type t = GetType();
        while(null != t)
        {
            if(t.FullName.Equals(typeName))
            {
                break;
            }

            t = t.BaseType;
        }
        
        if (null == t)
        {
            throw new RemotingException(String.Format(
                CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_BadType"),
                                              typeName));
        }

        FieldInfo fldInfo = t.GetField(fieldName, BindingFlags.Public | 
                                                  BindingFlags.Instance | 
                                                  BindingFlags.IgnoreCase);
        if(null == fldInfo)
        {
            throw new RemotingException(String.Format(
                CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_BadField"),
                                              fieldName, typeName));            
        }
        
        return fldInfo;
    }
}