摘要: /// <summary> /// 获取IIS版本 /// </summary> /// <returns></returns> public static int GetIISVersion() { DirectoryEntry getEntry = new DirectoryEntry("IIS://localhost/W3SVC/INFO"); int num = 5; try { num... 阅读全文
posted @ 2013-04-11 14:54 赵 磊 阅读(325) 评论(0) 推荐(0)
摘要: 对文件夹设置为Everyone的权限,首先需要先添加引用using System.Security.AccessControl;采用下面的方法对文件夹设置Everyone权限 /// <summary> /// 设置文件夹权限,处理为Everyone所有权限 /// </summary> /// <param name="foldPath">文件夹路径</param> public static void SetFileRole(string foldPath) { DirectorySe... 阅读全文
posted @ 2013-04-11 14:45 赵 磊 阅读(505) 评论(0) 推荐(1)
摘要: 筛选您可以使用熟悉的 C# 逻辑 AND 和 OR 运算符来根据需要在 where 子句中应用任意数量的筛选表达式。例如,若要只返回位于“伦敦”AND 姓名为“Devon”的客户,您应编写下面的代码:where cust.City=="London"&& cust.Name =="Devon"若要返回位于伦敦或巴黎的客户,您应编写下面的代码:where cust.City =="London"|| cust.City =="Paris" 阅读全文
posted @ 2012-02-06 11:13 赵 磊 阅读(131) 评论(0) 推荐(0)