>Nur geringfügig... ;-)
>Ich nehme an Du willst zu Laufzeit checken !?
>Und nicht den Source/Klasse, sondern den Inhalt des Objektes.
>

Also nochmals hier ist meiner sample class :-)

[XmlRoot("shoppingList")]
public class ShoppingList {
  private ArrayList listShopping;

  public ShoppingList() {
    listShopping = new ArrayList();
  }

  [XmlElement("item")]
  public Item[] Items {
    get {
      Item[] items = new Item[ listShopping.Count ];
      listShopping.CopyTo( items );
      return items;
    }
    set {
      if( value == null ) return;
      Item[] items = (Item[])value;
      listShopping.Clear();
      foreach( Item item in items )
        listShopping.Add( item );
    }
  }

  public int AddItem( Item item ) {
    return listShopping.Add( item );
  }
}

// Items in the shopping list
public class Item {
  [XmlAttribute("name")] public string name;
  [XmlAttribute("price")] public double price;

  public Item() {
  }

  public Item( string Name, string Price ) {
    name = Name;
    price = Price;
  }
}


So nun wird diese einmal gefuellt mit x daten

ShoppingList myList1 = new ShoppingList();
myList.AddItem( new Item( "eggs",1.49 ) );
myList.AddItem( new Item( "ground beef",3.69 ) );
myList.AddItem( new Item( "bread",0.89 ) );


Und eine andere 
ShoppingList myList2= new ShoppingList();
myList.AddItem( new Item( "eggs",1.49 ) );
myList.AddItem( new Item( "ground beef",3.69 ) );
myList.AddItem( new Item( "bread",0.89 ) );


So nun mochte ich wissen myList1 mit myList2
ob sie die gleichen inhalt haben in dem ersten fall ja

ShoppingList myList2= new ShoppingList();
myList.AddItem( new Item( "eggs",2.49 ) );
myList.AddItem( new Item( "ground beef",3.69 ) );
myList.AddItem( new Item( "bread",0.89 ) );
 

In diesem fall nicht. mein frage kann ich das
nun irgendwie mit .NET mittel machen oder muss 
ich das zu fuss machen?

Gruss

Roman Pittroff
Consulting
Bangkok, Thailand




_______________________________________________
Asp.net Mailingliste, Postings senden an:
Asp.net@glengamoi.com
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Reply via email to