随笔分类 - C#
摘要:在C#中循环显示SESSIOn: Response.Write("<br>Session的所有值:<br>"); foreach (string obj in Session.Contents) { Response.Write(obj.ToString() + ":" + Session[obj]
阅读全文
摘要:SmtpClient smtp = new SmtpClient(); //实例化一个SmtpClient smtp.DeliveryMethod = SmtpDeliveryMethod.Network; //将smtp的出站方式设为 Network smtp.EnableSsl = false;
阅读全文
摘要:一、C# 日期格式 DateTime dt = DateTime.Now; dt.ToString();//2005-11-5 13:21:25 dt.ToFileTime().ToString();//127756416859912816 dt.ToFileTimeUtc().ToString()
阅读全文
摘要://2008年4月24日 System.DateTime.Now.ToString("D"); //2008-4-24 System.DateTime.Now.ToString("d"); //2008年4月24日 16:30:15 System.DateTi...
阅读全文
摘要:方法一:private void tBox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 0x20) e.KeyChar = (char)0; //禁止空格键 if ((e...
阅读全文

浙公网安备 33010602011771号