比如在程序中,为了验证程序集是否有签名,可调用如下方法 [DllImport("mscoree.dll", CharSet=CharSet.Unicode)] …
这项API提供的实用功能常常用来管理应用程序中的服务,而不必到控制面板的管理服务中进行操作。 ServiceController controller = new ServiceC…
OperatingSystem os = System.Environment.OSVersion; Console.WriteLine(“Platform: {0}”, os.P…
可以通过Windows Management Instrumentation (WMI)提供的接口读取所需要的信息。 private static UInt32 CountPhys…
/// <summary> /// Converts HTML to plain text. /// </summary> class HtmlToText…
using System; using System.Collections.Generic; using System.Linq; using System.Text; usin…
using System.IO; using System.Windows.Forms; OpenFileDialog dlg = new OpenFileDialog(); dl…
using System; using System.IO; string filetomerge=@"C:\temp\data.bin"; string ta…
1.在http://zxingnet.codeplex.com/站点上下载ZXing .Net的第三方库 2.新建一个WPF工程 3.引入zxing.dll 4.添加引用空间 us…
反序列化(path为xml文件路径) public static List<T> GetXmlData(string path) { if (File.Exists(p…
using System; using System.Collections.Generic; using System.Linq; using System.Text; usin…
一个用来调用DOS命令的C#操作类 /***********************************************************************…