
.NET
Luca一y
这是个菜鸟
展开
-
.NET winform三种计时器的使用
System.Windows.Forms.Timer会影响界面的响应,不建议使用,适合单线程,精确度不高private System.Windows.Forms.Timer timerGetTime;public void TestTimer(){ //创建定时器 timerGetTime = new System.Windows.Forms.Timer(); //设置定时器属性 timerGetTime.Tick+=new EventHandler(HandleTime); ..原创 2021-07-09 16:39:56 · 1708 阅读 · 0 评论 -
C# 简单获取本地IP地址
public static string GetIP(){ IPAddress ip = null; try{ ip = Dns.GetHostEntry(Dns.GetHostName()).First(e=>e.AddressFamily==AddressFamily.InterNetwork); //IPAddress[] ips = Dns.GetHostEntry(D...原创 2020-03-20 15:29:11 · 160 阅读 · 0 评论 -
.NET 后台刷新4种方式
1.Response.Redirect(Request.Url.ToString());2.Resonspe.Write(“<script language=javascript>window.location.href=document.URL;</script>”);3.Response,AddHeader(“Refresh”,”0”);4.Response.Wr...原创 2019-11-19 17:10:12 · 407 阅读 · 0 评论