Ejemplo n.º 1
0
        public void Remove(Library lib)
        {
            Queue <Organization> linkCopy = new Queue <Organization>();

            Organization[] tempArr = link.ToArray();
            foreach (Organization x in tempArr)
            {
                if (!x.Equals(lib))
                {
                    linkCopy.Enqueue(x);
                }
            }
            link = linkCopy;

            Queue <string> keyCopy = new Queue <string>();

            string[] tempArr1 = key.ToArray();
            foreach (string x in tempArr1)
            {
                if (!(x == lib.BaseOrg.ToString()))
                {
                    keyCopy.Enqueue(x);
                }
            }
            key = keyCopy;

            Coll1.Remove(lib.BaseOrg);
            Coll2.Remove(lib.BaseOrg.ToString());
        }
Ejemplo n.º 2
0
 public MainViewModel()
 {
     Coll1.Add(
         new Person
     {
         FirstName = "TOUMI",
         LastName  = "Redhouane",
         Val       = 12.2f
     });
     Coll1.Add(
         new Person
     {
         FirstName = "CHERCHALI",
         LastName  = "Karim",
         Val       = 15.3f
     });
     Coll2.Add(
         new Person
     {
         FirstName = "TOUMI",
         LastName  = "Djamel",
         Val       = 12.2f
     });
     Coll2.Add(
         new Person
     {
         FirstName = "CHERCHALI",
         LastName  = "Redha",
         Val       = 12.2f
     });
 }