shim hace 8 años
padre
commit
5e305c82a4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      UAS_DLLTest/Form1.cs

+ 1 - 1
UAS_DLLTest/Form1.cs

@@ -118,7 +118,7 @@ namespace UAS_DLLTest
             method = helper.GetType().GetMethods();
             for (int i=0;i<method.Length;i++) {
                 //判断是否需要显示
-                if ((method[i].GetCustomAttribute(typeof(DescriptionAttribute)) as DescriptionAttribute) == null)
+                if (method[i].GetCustomAttributes(typeof(DescriptionAttribute), true).Length==0)
                 {
                     continue;
                 }