08 2012 档案

c#读取带命名空间的xml
摘要:boolean var doc = new XmlDocument(); var namespaceManager = new XmlNamespaceManager(doc.NameTable); namespaceManager.AddNamespace("xsi", "http://w... 阅读全文

posted @ 2012-08-03 17:41 空明流光 阅读(235) 评论(0) 推荐(0) 编辑

WindowService 执行命令
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Linq;using System.ServiceProcess;using System.Text;using System.Threading;using System.Net.Sockets;using System.Net;namespace WindowsService1{ public partial class Adm... 阅读全文

posted @ 2012-08-03 14:28 空明流光 阅读(230) 评论(0) 推荐(0) 编辑

C#执行DOS命令(CMD命令) (转)
摘要:在c#程序中,有时会用到调用cmd命令完成一些功能,于是在网上查到了如下方法,实现了 c#执行DOS命令,并返回结果。[csharp] view plaincopyprint? //dosCommand Dos命令语句 publicstring Execute(string dosCommand) { return Execute(dosCommand, 10); } /// <summary> /// 执行DOS命令,返回DOS命令的输出 /// </summary> /// <param name="dosCommand">dos命令 阅读全文

posted @ 2012-08-02 21:27 空明流光 阅读(395) 评论(0) 推荐(0) 编辑

C#中winform隐藏启动窗体及this.invoke匿名函数
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace CommandService{ public partial class Form1 : Form { public Form1() { ... 阅读全文

posted @ 2012-08-02 21:11 空明流光 阅读(924) 评论(0) 推荐(0) 编辑

C#UDP通信最简单一例
摘要:接收端:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;namespace Server{ class Program { static void Main(string[] args) { var udpReceiver = new UdpClient(8112, AddressFamily.InterNetwork); ... 阅读全文

posted @ 2012-08-02 19:49 空明流光 阅读(388) 评论(1) 推荐(1) 编辑

导航