MethodSpec methodSpec = ...; MethodMetaInfo metaInfo = methodSpec.GetMetaInfo (); Console.WriteLine (metaInfo.Name); Console.WriteLine (metaInfo.HasReturnType); Console.WriteLine ("Parameters:"); foreach (Parameter p in metaInfo.Parameters) Console.WriteLine ($"{p.Name}: {p.Type}");
MethodSpec methodSpec = ...; MethodMetaInfo metaInfo = methodSpec.GetMetaInfo (); CustomAttribute [] attributes = metaInfo.GetCustomAttributes (); foreach (CustomAttribute attribute in attributes) { Console.WriteLine (attribute.Type.FullName); }In both examples, the Mono.CSharp library is used to access the MethodSpec.GetMetaInfo method.