C \ # 한자 판단 의 실현

2946 단어 C#
http://bbs.csdn.net/topics/380159364  을 보 니 재 미 있 었 고 복원 을 했 습 니 다.여기 서 여러분 과 공유:
/**
 *   :  
 *   :2013 2 28 
 *   :
 * 
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace com.mksword.funny
{
    #region  
    /// <summary>
    ///    
    /// </summary>
    public class   
    {
        /// <summary>
        ///       
        /// </summary>
        /// <param name="Control">     </param>
        /// <returns>   </returns>
        public static        (bool Control)
        {
            return new    (Control);
        }
    }

    /// <summary>
    ///         
    /// </summary>
    public class    
    {
        /// <summary>
        ///      
        /// </summary>
        private bool Result;

        /// <summary>
        ///     
        /// </summary>
        /// <param name="flag">     </param>
        public    (bool flag)
        {
            Result = flag;
        }
    }

    /// <summary>
    ///          
    /// </summary>
    public class  
    {
        /// <summary>
        ///      
        /// </summary>
        private bool Result;

        /// <summary>
        ///     
        /// </summary>
        /// <param name="flag">     </param>
        public  (bool flag)
        {
            Result = flag;
        }
    }

    /// <summary>
    ///      
    /// </summary>
    public static class     
    {
        /// <summary>
        ///             
        /// </summary>
        /// <param name="rgs">   “   ” </param>
        /// <param name="ac">     </param>
        /// <returns>“ ” </returns>
        public static    (this     rgs, Action ac)
        {
            bool flag;
            Type tr = rgs.GetType();
            flag = (bool)tr.InvokeMember("Result", BindingFlags.Instance |
                BindingFlags.NonPublic | BindingFlags.GetField, null, rgs, 
                null);
            if (flag)
                ac();
            return new  (flag);
        }

        /// <summary>
        ///             
        /// </summary>
        /// <param name="z">   “ ” </param>
        /// <param name="ac">     </param>
        public static void   (this   z, Action ac)
        {
            bool flag;
            Type tz = z.GetType();
            flag = (bool)tz.InvokeMember("Result", BindingFlags.Instance |
                BindingFlags.NonPublic | BindingFlags.GetField, null, z, null);
            if (!flag)
                ac();
        }
    }
    #endregion
}

좋은 웹페이지 즐겨찾기