?? spooler.cs
字號:
using System;
namespace singleSpooler
{
/// <summary>
/// Prototype of Spooler Singleton
/// such that only one instane can ever exist.
/// </summary>
public class Spooler {
static bool instance_flag = false; //true if one instance
public Spooler() {
if (instance_flag)
throw new SingletonException("Only one printer allowed");
else
instance_flag=true; //set flag for one instance
Console.WriteLine ("printer opened");
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -