using System.IO;
class TestDirectory {
public static void Main() {
Directory.CreateDirectory("C:\\csharp");
}
}
The above lines of codes will create a directory in your C:
Please note that the backslash(\) should be escaped by another backslash since it is a escape character. Moreover, remember to "using" the System.IO namespace so as to use these classes.
Following are a list of useful methods:
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application oWord;
oWord = new Microsoft.Office.Interop.Word.Application();
oWord.Visible = true;
Microsoft.Office.Interop.Word.Document oDoc;
ต่อเนื่องจาก C++ Dll Win32 Console Project
ในบทความนี้เป็นการใช้ C# เรียกใช้ DLL ที่เขียนจากภาษา C++
1. สร้างโปรเจ็กส์ C# เพื่อใช้งาน Dll ชื่อ CSConsole เป็นแบบ Console Application