Esempio n. 1
0
    public massage clonemassage()
    {
        massage m = new massage();

        m.time   = this.time;
        m.reader = this.reader;
        m.sender = this.sender;
        m.data   = this.data;
        return(m);
    }
Esempio n. 2
0
        static void Main(string[] args)
        {
            massage first = new massage();

            first.setsender("mrA");
            first.setreader("mrB");
            first.setime(180310);
            first.setdata("how are you");
            massage firstc = first.clonemassage();

            firstc.setreader("mrC");
            Console.WriteLine("first=firstc?");
            Console.WriteLine(first == firstc);
            first.read();
            firstc.read();
        }