阅后即焚

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
 1      /// <summary>
 2         /// 检查是否是静态成员
 3         /// </summary>
 4         /// <returns></returns>
 5         protected bool CheckStatic(PropertyInfo propertyInfo)
 6         {
 7             var getMethod = propertyInfo.GetMethod;
 8             if (getMethod != null)
 9             {
10                 return getMethod.IsStatic;
11             }
12             else
13             {
14                 var setMethod = propertyInfo.SetMethod;
15                 return setMethod.IsStatic;
16             }
17         }

 

posted on 2019-01-02 13:51  阅后即焚  阅读(1052)  评论(0编辑  收藏  举报