title: Output in txt in C# Class library
body: <p>How can i make output in txt? but not in the event log</p>
  
  <pre><code>public class ProjectHandler:Microsoft.Office.Project.Server.Events.ProjectEventReceiver {
  
  }
  
  public static void WriteToEventLog(string textLog, EventLogEntryType logtype)  {
      EventLog eventlog = new EventLog();
      eventlog.Source = "Project Event Handler";
      eventlog.WriteEntry(logtype.ToString() + ":" + textLog, logtype);
  
  }
  
  public override void OnDeleting(PSContextInfo contextInfo, ProjectPreEventArgs e) {
  
      WriteToEventLog(string.Format("Пользователь \"{0}\" удалил проект \"{1}\"", contextInfo.UserName, e.ProjectName), EventLogEntryType.Information);
  
      base.OnDeleting(contextInfo, e);
  }
  </code></pre>