zoukankan      html  css  js  c++  java
  • 给string加几个扩展方法

    代码
        public static class StringExtend
        {
            
    public static bool IsNullOrEmpty(this string s)
            {
                
    return string.IsNullOrEmpty(s);
            }

            
    public static bool IsInt(this string s)
            {
                
    int i;
                
    return int.TryParse(s, out i);
            }

            
    public static int ToInt(this string s)
            {
                
    return int.Parse(s);
            }
        }
  • 相关阅读:
    10.18
    10.16~10.17笔记
    JS
    10.8~10.11
    9.28~9.29
    9.27 代码笔记
    代码复习(9.26)
    9.19 链家
    9.18笔记
    9.17 定位
  • 原文地址:https://www.cnblogs.com/digjim/p/1701409.html
Copyright © 2011-2022 走看看