一种常用的产生表达式的方式

来源:互联网 发布:sql固定电话格式校验 编辑:程序博客网 时间:2024/05/01 05:47

         static bool GetStringLength( string str)
        {

            Expression<Func<String, bool>> exp = ss => ss.Contains("a");

         
            return exp.Compile()(str);
        }

原创粉丝点击