public static string MemberInfo(MemberInfo info, bool includeDeclaringType = true)
{
if (info is MethodInfo)
return MethodInfo(info as MethodInfo, includeDeclaringType);
else if (info is ConstructorInfo)
return ConstructorInfo(info as ConstructorInfo, includeDeclaringType);
else if (info is PropertyInfo)
return PropertyInfo(info as PropertyInfo, includeDeclaringType);
else if (info is FieldInfo)
return FieldInfo(info as FieldInfo, includeDeclaringType);
else if (info is EventInfo)
return EventInfo(info as EventInfo, includeDeclaringType);
else if (info is Type)
return Type(info as Type);
else if (info != null)
return info.ToString();
else
return "null";
}