摘要: int[] numbers = new int[] { 10, 55, 43, 13, 57, 40, 22, 88 };var result = from number in numbers where number % 2 == 0 orderby number descending select number; foreach (var item in result) { Console.Write("{0}\t", item); }------------------------------------------------------------------------string 阅读全文
posted @ 2010-12-22 16:31 RobotTech 阅读(242) 评论(0) 推荐(0) 编辑
摘要: //HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application string source = "WCF Event Log"; if (!EventLog.SourceExists(source)) { EventLog.CreateEventSource(source, "Application"); } EventLog myLog = new EventLog(); myLog.Source = source; myLog.WriteEntry("1111", EventLogEntryType.E 阅读全文
posted @ 2010-12-22 16:28 RobotTech 阅读(311) 评论(0) 推荐(0) 编辑