using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        string test = "aaa";

        ~Program()
        {
            StreamWriter lastGasp;
            lastGasp = File.CreateText("yourlog.txt");
            lastGasp.WriteLine("It's a Log" + test);
            lastGasp.Flush();
            lastGasp.Close();
        }

        public Program()
        {

        }
        static void Main(string[] args)
        {
            Program t = new Program();
        }
    }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-01-02
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案