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

推荐订阅源

G
Google Developers Blog
V
Vulnerabilities – Threatpost
A
Arctic Wolf
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
Hugging Face - Blog
Hugging Face - Blog
H
Hacker News: Front Page
D
Docker
人人都是产品经理
人人都是产品经理
Attack and Defense Labs
Attack and Defense Labs
Forbes - Security
Forbes - Security
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
aimingoo的专栏
aimingoo的专栏
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Simon Willison's Weblog
Simon Willison's Weblog
腾讯CDC
WordPress大学
WordPress大学
T
Tenable Blog
P
Proofpoint News Feed
月光博客
月光博客
T
Tor Project blog
The Cloudflare Blog
罗磊的独立博客
S
Secure Thoughts
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The Hacker News
The Hacker News
P
Palo Alto Networks Blog
I
Intezer
小众软件
小众软件
N
News | PayPal Newsroom
V
Visual Studio Blog
L
LINUX DO - 最新话题
W
WeLiveSecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Troy Hunt's Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
D
DataBreaches.Net
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security Affairs
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
阮一峰的网络日志
阮一峰的网络日志

博客园 - 站在天空下的猪

SqlBulkCopy批量转移数据备注 根据文本框联动下拉框(jquery 插件) - 站在天空下的猪 - 博客园 关于用FOMR提交编码的问题 jquery 图片预览插件 - 站在天空下的猪 - 博客园 自己写的一个jquery模板引擎(json比较好用) Document 对象的常用方法 今天发现梅花雨日历控件蛮好用的哟,腾讯都在用 身份证对应县及县的行政区划代码 【SQLSERVER】存储过程基础 终于解决了一个AjaxPro无刷新的问题了,可以引用在短信方面滴asp.net 2.0 昨天很失败 一个简单的FileUpload处理逻辑 DataBinder.Eval总结 asp.net 2.0中实现防盗链 如何把HTML语句直接保存到数据库 如何取得IP/用户名等信息 “ConnectionString 属性尚未初始化”的另类解决办法 asp.net常用函数表 C#中计算两个时间的差
C# 判断是否为数字
站在天空下的猪 · 2007-05-19 · via 博客园 - 站在天空下的猪

1、
int n;
string str="xxx";
if(int.TryParse(str,out n))
{
   //为数字
}
else
{
 //非数字
}

2、
1、string pat=@"[\u4e00-\u9fa5]";
Regex rg=new Regex(pat);
Match mh=rg.Match(textBox1.Text);
if(mh.Success)
{
 //是汉字
}
2、function fucCheckNUM(NUM)
{
var i,j,strTemp;
strTemp="0123456789.";
if ( NUM.length== 0)
return 0
for (i=0;i<NUM.length;i++)
{
j=strTemp.indexOf(NUM.charAt(i));
if (j==-1)
{
//说明有字符不是数字
return 0;
}
}
//说明是数字
return 1;
}

void bool CheckNUM(string str)
{
           if(str==string.Empty||string==null)
             retrun false;
          try
            {
                decimal.Parse(str)
             }
        catch
          {
             return false; 
          }
          return true;
}

public static bool IsNumber(string strNumber)
{
    Regex regex = new Regex("[^0-9]");
    return !regex.IsMatch(strNumber);
}

System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"^[-]?\d+[.]?\d*$");
         
if(reg1.IsMatch(str))
{
//数字
}
else
{
//非数字
}