前把日期我有以下代碼:在XML文件名
XmlSerializer SerializeObj = new XmlSerializer(dirs.GetType());
TextWriter WriteFileStream = new StreamWriter(@"G:\project\tester.xml");
SerializeObj.Serialize(WriteFileStream, dirs);
WriteFileStream.Close();
我試圖把一個日期/時間戳記的XML文件名前面。因此,使用這個例子,我會喜歡0615_Tester.xml
任何想法如何做到這一點?我想確保我可以做日期/時間__ [文件名] .xml,並仍然指定它在我的G:\
在此先感謝。
幾乎相同:http://stackoverflow.com/questions/941132/creating-a-new-txt-file-with-date-in-front-c – crashmstr 2009-06-15 19:16:32
是的,有點......但我試過在這裏,它沒有工作。 – yeahumok 2009-06-15 19:21:11