代码改变世界

阅读排行榜

C#如何彻底关闭自已,退出子线程?

2013-03-27 16:13 by 观海看云, 5031 阅读, 收藏,
摘要: 托管线程或者是后台线程,或者是前台线程。后台线程不会使托管执行环境处于活动状态,除此之外,后台线程与前台线程是一样的。一旦所有前台线程在托管进程 (其中 .exe 文件是托管程序集)中被停止,系统将停止所有后台线程并关闭。通过设置 Thread.IsBackground 属性,可以将一个线程指定为后台线程或前台线程。例如,通过将 Thread.IsBackground 设置为 true,就可以将线程指定为后台线程。同样,通过将 IsBackground 设置为 false,就可以将线程指定为前台线程。从非托管代码进入托管执行环境的所有线程都被标记为后台线程。通过创建并启动新的 Thread 对 阅读全文

C#获取应用程序图标获取后在保存成ICO文件

2011-04-25 14:17 by 观海看云, 5000 阅读, 收藏,
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Runtime.InteropServices;usingSystem.IO;namespaceWindowsApplication1{publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}[S. 阅读全文

sql语句-linq语言-lambda表达式对照

2011-03-02 22:11 by 观海看云, 4998 阅读, 收藏,
摘要: 1、 查询Student表中的所有记录的Sname、Ssex和Class列。select sname,ssex,class from studentLinq: from s in Students select new { s.SNAME, s.SSEX, s.CLASS }Lambda: Students.Select( s => new { SNAME = s.SNAME,SSEX = s.SSEX,CLASS = s.CLASS }) 2、 查询教师所有的单位即不重复的Depart列。select distinct depart from teacherLinq: from t i 阅读全文

wpf 文字动态动画效果

2011-07-07 18:23 by 观海看云, 4345 阅读, 收藏,
摘要: ... 阅读全文

C# 快速关机代码

2010-03-22 20:32 by 观海看云, 4158 阅读, 收藏,
摘要: 今天用到这个,网上找个不错的,保存下来。注意:这个方法是快速关机,不会保存你的任何未保存信息。// 这个结构体将会传递给API。使用StructLayout [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; ... 阅读全文
上一页 1 2 3 4 5 6 7 ··· 58 下一页