会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ZCoding
山不过来,我就过去!
博客园
首页
新随笔
联系
订阅
管理
2015年2月6日
使用python发送Email
摘要: import smtplibfrom email.mime.text import MIMETextdef SendEmail(): email = "" #设置收件地址 mailto_list=[email] mail_host="" #设置服务器 mail_user...
阅读全文
posted @ 2015-02-06 15:49 ZCoding
阅读(966)
评论(0)
推荐(0)
2015年2月5日
C#如何测试代码运行时间
摘要: 第一种方式:System.Diagnostics.Stopwatch stopwatch = new Stopwatch();stopwatch.Start(); // 开始监视代码运行时间// 需要测试的代码 ....stopwatch.Stop(); // 停止监视TimeSpan tim...
阅读全文
posted @ 2015-02-05 09:55 ZCoding
阅读(23982)
评论(1)
推荐(3)
2015年2月3日
C# WinForm TextBox添加水印效果
摘要: 1、新建项目添加WatermarkTextBox类:using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using System.Drawing;using System...
阅读全文
posted @ 2015-02-03 11:59 ZCoding
阅读(5169)
评论(0)
推荐(0)
2015年1月8日
C#判断输入的是否是汉字
摘要: 第一种方法:正则表达式 string text = "是不是汉字"; for (int i = 0; i = 0x4e00 && (int)c[i] 127) Console.WriteLine("是汉字"); ...
阅读全文
posted @ 2015-01-08 10:52 ZCoding
阅读(5231)
评论(0)
推荐(0)
C#判断Textbox是否为数字
摘要: 第一种方法:try{ if (int.Parse(textBox1.Text) > 0) { //操作代码 } else { MessageBox.Show("必须是正整数"); }}catch (FormatException){ ...
阅读全文
posted @ 2015-01-08 10:32 ZCoding
阅读(4427)
评论(0)
推荐(0)
2014年12月29日
c# DateTime时间格式和JAVA时间戳格式相互转换
摘要: /// java时间戳格式时间戳转为C#格式时间 public static DateTime GetTime(long timeStamp){ DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970...
阅读全文
posted @ 2014-12-29 17:12 ZCoding
阅读(3011)
评论(0)
推荐(0)
C# DateTimePicker控件详解
摘要: 1、同时显示日期和时间DateTimePicker dtp = new DateTimePicker(); dtp.Format = DateTimePickerFormat.Custom;dtp.CustomFormat = "yyyy-MM-dd HH:mm:ss";2、时间选择方式dtp.Sh...
阅读全文
posted @ 2014-12-29 16:49 ZCoding
阅读(8391)
评论(0)
推荐(0)
公告