摘要: 28、IndexOf() 查找字串中指定字符或字串首次出现的位置,返首索引值,如: str1.IndexOf("字"); //查找"字"在str1中的索引值(位置) str1.IndexOf("字串");//查找"字串"的第一个字符在str1中的索引值(位置) str1.IndexOf("字串",3,2);//从str1第4个字符起,查找2个字符,查找"字串"的第一个字符在str1中的索引值(位置... 阅读全文
posted @ 2009-02-20 18:29 听雪狂客 阅读(1834) 评论(0) 推荐(0) 编辑
摘要: 8、String user_IP=Request.ServerVariables["REMOTE_ADDR"].ToString(); 取远程用户IP地址9、穿过代理服务器取远程用户真实IP地址: if(Request.ServerVariables["HTTP_VIA"]!=null){ string user_IP=Request.ServerVariables["HTTP_X_FORWARD... 阅读全文
posted @ 2009-02-20 18:28 听雪狂客 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 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 日=curre... 阅读全文
posted @ 2009-02-20 18:27 听雪狂客 阅读(200) 评论(0) 推荐(0) 编辑