惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
P
Proofpoint News Feed
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
美团技术团队
D
Docker
博客园 - Franky
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 挖土.

学笛子 PowerShell: Try...Catch...Finally 实现方法 How to set the compuder to auto login 让 PowerShell 2.0 支持 DotNet FrameWork 4.0 用 Powershell 安装Dotnet FrameWorrk 4.0 PowerShell 调用.netFramework中的静态函数 PowerGUI Visual Studio is now in beta! PowerShell 中定义和使用泛型 PowerShell 如何引用DLL PowerShell中Add-Content 和 Out-File 的区别 加快 c++ Builder 5编译速度 Windows 7 下的 SUBST 命令 How to configure the BDE for Windows Vista/7 - 挖土. Linker problems with Borland builder SQL 中的中位值计算 Windows 7的“上帝模式” XML 序列化和反序列化详例代码 给存储过程传递一个表 VSIdeTesthost installation issue - 挖土.
给string加几个扩展方法
挖土. · 2010-03-31 · via 博客园 - 挖土.

Posted on 2010-03-31 14:58  挖土.  阅读(456)  评论(3)    收藏  举报

代码

    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);
        }
    }