主题: 为什么我的代码块无风格? |
作者: shenweishou, 发布日期: 2012-11-01 15:31:25, 浏览数: 1954 |
比如我粘贴的C#代码: (以下是用代码粘贴) 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.IO; namespace WindowsService1 { public partial class Monitor : ServiceBase { DateTime temp; public Monitor() { InitializeComponent(); } protected override void OnStart(string[] args) { StreamWriter writer = File.AppendText("d:\\file1.xml"); writer.Write("<time>"); writer.WriteLine("<Date> " + (DateTime.Now.ToString("dd-MM-yy")) + "</Date>"); writer.WriteLine("<started> " + (DateTime.Now.ToString("t")) + "</started>"); temp = DateTime.Now; writer.Close(); } protected override void OnStop() { } } }
|
作者: shenweishou, 发布日期: 2012-11-01 15:32:25 |
原来要发出去后才能看到,咋就不能直接看到呢? |
回复 |