Mega Code Archive

 
Categories / C# Tutorial / Windows
 

Compile to dll

// compile with: csc /r:..\logdriver.dll /target:library logaddintofile.cs using System; using System.Collections; using System.IO; public class LogAddInToFile {     StreamWriter streamWriter;          public LogAddInToFile()     {         streamWriter = File.CreateText(@"logger.log");         streamWriter.AutoFlush = true;     }          public void Log(string message)     {         streamWriter.WriteLine(message);     } }