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

推荐订阅源

T
Threatpost
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
博客园_首页
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
Intezer
P
Palo Alto Networks Blog
V
Vulnerabilities – Threatpost
雷峰网
雷峰网
O
OpenAI News
SecWiki News
SecWiki News
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
N
News | PayPal Newsroom
Project Zero
Project Zero
Forbes - Security
Forbes - Security
IT之家
IT之家
A
Arctic Wolf
WordPress大学
WordPress大学
Jina AI
Jina AI
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
博客园 - 聂微东
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
Cloudbric
Cloudbric
G
GRAHAM CLULEY
博客园 - 叶小钗
H
Hacker News: Front Page
腾讯CDC
量子位
Help Net Security
Help Net Security
人人都是产品经理
人人都是产品经理
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
爱范儿
爱范儿
L
Lohrmann on Cybersecurity
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recorded Future
Recorded Future
C
CERT Recently Published Vulnerability Notes

博客园 - Xfan

TextBox只能输入数字[转] - Xfan - 博客园 Oracle Sql 语法收集[转] 计算机类期刊投稿心得(转贴) 对生活和工作很有用的箴言 一个功能齐全的DataGrid分页例子 Oracle中正确利用Rownum来限制查询所返回的行数 Oracle中取某时间段月份列表 Linux安装的必要知识 常见的UNIX版本说明 免费软件大名单公布 - Xfan - 博客园 全方位解析RPR技术 IP环网技术 IP环网技术综述与实现 如何把一个图像存储到XML数据中,并读取出来 [藏]通过.NET访问Oracle数据库 [转]Oracle简单示例讲解 [总结]Oracle数据导入导出imp/exp System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.的解决方案 官方水晶报表.NET 应用程序实例下载(C#、Visual C++.NET)
[积累]c#.net常用函数
Xfan · 2006-08-29 · via 博客园 - Xfan

1、DateTime   数字型 
       System.DateTime currentTime=new System.DateTime(); 
  1.1 取当前年月日时分秒 
       currentTime=System.DateTime.Now; 
  1.2 取当前年 
       int 年=currentTime.Year; 
  1.3 取当前月 
       int 月=currentTime.Month; 
  1.4 取当前日 
       int 日=currentTime.Day; 
  1.5 取当前时 
       int 时=currentTime.Hour; 
  1.6 取当前分 
       int 分=currentTime.Minute; 
  1.7 取当前秒 
       int 秒=currentTime.Second; 
  1.8 取当前毫秒 
    int 毫秒=currentTime.Millisecond; 

2、  变量.ToString()      
   字符型转换 转为字符串 
   12345.ToString("n");        //生成   12,345.00 
   12345.ToString("C");        //生成 ¥12,345.00 
   12345.ToString("e");        //生成 1.234500e+004 
   12345.ToString("f4");        //生成 12345.0000 
   12345.ToString("x");         //生成 3039  (16进制) 
   12345.ToString("p");         //生成 1,234,500.00%

3、char.IsWhiteSpce(字串变量,位数)——逻辑型 
    查指定位置是否空字符; 
    如: 
    string str="中国  人民"; 
    Response.Write(char.IsWhiteSpace(str,2)); //结果为:True, 第一个字符是0位,2是第三个字符。

4、char.IsPunctuation('字符')  --逻辑型 
    查字符是否是标点符号 
   如:Response.Write(char.IsPunctuation('A'));   //返回:False