C#
文章平均质量分 64
sun庆
刚刚进入软件开发的程序员之路
展开
-
C#获取系统文件、文件夹和磁盘驱动器图标
最近开发一款软件需要用到获取系统文件的图标,在网上找了一下发现有以下方式获取:1、调用API的方式获取 public class SystemIcon { /// /// 引用shell32文件的SHGetFileInfo API方法 ///原创 2013-06-19 22:54:49 · 2583 阅读 · 0 评论 -
人民币小写金额转大写金额
#region 人民币小写金额转大写金额 /// /// 小写金额转大写金额 /// /// 接收需要转换的小写金额 /// 返回大写金额 public static string ConvertMoney(Decimal Money) {原创 2013-06-23 01:12:25 · 705 阅读 · 0 评论 -
打开我的电脑和我的文档
// 打开我的电脑:System.Diagnostics.Process.Start("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}");// 打开我的文档:System.Diagnostics.Process.Start("::{450d8fba-ad25-11d0-98a8-0800361b1103}");1、打开指定文件System原创 2013-06-23 00:54:20 · 564 阅读 · 0 评论 -
清理内存
[DllImport("kernel32.dll")] public static extern bool SetProcessWorkingSetSize(IntPtr proc, int min, int max); /// /// 清理内存 /// public static void Reduc原创 2013-06-23 01:11:30 · 449 阅读 · 0 评论 -
字符串、文件大小格式、气泡信息提示、邮箱地址和电话号码合法性
/// /// 判断字符串是否为整数 /// /// /// public static bool IsNumeric(string str) { if (str.Trim() == "") { return fa原创 2013-06-26 22:00:36 · 748 阅读 · 0 评论 -
C#获取驱动器盘符
一、使用ManagementObjectSearcher类 static void Main(string[] args) { SelectQuery selectQuery = new SelectQuery("select * from win32_logicaldisk"); ManagementObjectS原创 2013-06-26 22:04:04 · 779 阅读 · 0 评论 -
关闭一个进程
/// /// 关闭一个进程 /// /// 进程名 public void StopProcess(string processName) { try { foreach (Process thisProc in Process.G原创 2013-06-26 22:06:50 · 499 阅读 · 0 评论 -
字符串加解密
#region /// /// 加密原函数 /// /// /// /// public static string DesEncrypt(string pToEncrypt) { try {原创 2013-06-26 21:58:57 · 568 阅读 · 0 评论