Esempio n. 1
0
 public static Type GetMemberType(LangType t, string name, bool isstatic)
 {
     if (t == null || (object)t.DotnetType == null)
         throw new Exception("");
     var bf = isstatic ? BindingFlags.Static : BindingFlags.Instance;
     var a = t.DotnetType.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | bf).Where(i => i.Name == name).ToArray();
     if (a.Length == 1)
         return ResultType(a[0]);
     throw new NotSupportedException();
 }