Exemplo n.º 1
0
 public static Czat Create()
 {
     if (instancja == null)
     {
         instancja = new Czat();
     }
     return(instancja);
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Czat czat = Czat.Create();

            Console.WriteLine("User1:");
            string wej = Console.ReadLine();

            czat.Dodaj("User1: " + wej);
            Console.WriteLine("User2:");
            wej = Console.ReadLine();
            czat.Dodaj("User2: " + wej);

            Console.WriteLine(czat);
            Console.ReadLine();
        }