Ejemplo n.º 1
0
        private void Ws_GetMessageDatasCompleted(object sender, MobileService.GetMessageDatasCompletedEventArgs e)
        {
            //myClassList.Clear();
            var ttt = e.Result;

            foreach (MobileService.Message item in e.Result)
            {
                Message _Message = new Message();
                _Message.MessageDate = item.MessageTime;
                _Message.MessageData = item.messagedata;

                MyClassList.Add(_Message);
            }
        }
Ejemplo n.º 2
0
        public void test2()
        {
            IList <MyClass> list3 = new List <MyClass>();

            list3.Add(new MyClass(12));
            foreach (var x in list3)
            {
                AssertSame(12, x.MyInt);
            }

            var myClassList = new MyClassList();

            myClassList.Add(new MyClass(12));
            foreach (var x in myClassList)
            {
                AssertSame(12, x.MyInt);
            }
        }
Ejemplo n.º 3
0
    static void Main(string[] args)
    {
        MyClassList l = new MyClassList()
        {
            new MyClass()
            {
                Type = "Bob", Id = 1
            }, new MyClass()
            {
                Type = "Jones", Id = 2
            }
        };
        MyClassList l2 = new MyClassList()
        {
            new MyClass()
            {
                Type = "Jones", Id = 2
            }, new MyClass()
            {
                Type = "Bob", Id = 1
            }
        };
        MyClassList l3 = new MyClassList()
        {
            new MyClass()
            {
                Type = "Jones", Id = 2
            }
        };

        Console.WriteLine("{0} {1} {2}", l.GetHashCode(), l2.GetHashCode(), l3.GetHashCode());
        l3.Add(new MyClass()
        {
            Type = "Bob", Id = 1
        });
        Console.WriteLine("{0}", l3.GetHashCode());
    }