📜  C# 使用共享类 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:55.959000             🧑  作者: Mango

代码示例7
public class Utilities
{
  static private string InitialFileName;

  static Utilities()
  {
    InitialFileName = "NewFile" + DateTime.Now;
  }

  static public void CreateFile()
  {
    ...code using InitialFileName...
  }
}