using System;
using System.Threading;

class Demo : ICloneable
{
    private readonly long id;
    private int value;

    public Demo(int n)
    {
        value = n;
        id = DateTime.Now.Ticks;
    }

    public object Clone()
    {
        Demo obj = (Demo)this.MemberwiseClone();
        return obj;
    }

    public override string ToString()
    {
        return String.Format(" {0}, {1}", value, id);
    }
}

class Program
{
    static void Main(string[] args)
    {
        Console.Write("\n Original: ");
        Demo obj1 = new Demo(1);

        Console.WriteLine(" obj1: {0}", obj1);

        Demo obj2;
        Thread.Sleep(2222);

        Console.WriteLine("\n Klonen \n");
        obj2 = (Demo)obj1.Clone();

        Console.WriteLine(" obj1: {0}", obj1);
        Console.WriteLine(" obj2: {0}", obj2);
    }
}

