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;
}
}