Ergebnis 1 bis 3 von 3
-
entwickelt Apps
- 14.04.2011, 09:26
- #1
Hallo Zusammen
Ich verwalte in meinem Programm die Daten anhand von ObservableCollections und zum Speichern die IsolatedStorageSettings. Nun möchte ich beim aufrufen einer Site nur gewisse Objekte aus der Collection anzeigen. Dies wollte ich so lösen dass ich eine zweite Collection vom selben Typ mache und dann die Objekts einfach dort hinzufüge. Leider kommt immer beim hinzufügen eines Objekts immer eine "nullreferenceException".
Syntax etc scheint zu stimmen laut Visual Studio.
Temporäre Collection erstellen. Die permanente sieht genau gleich aus, halt einfach mit anderen Variabelnnamen.
Code:[FONT=Consolas][FONT=Consolas][FONT=Consolas]private[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]ObservableCollection[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]<[/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]KategorieVM[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]> _katAuswahl;[/FONT][/FONT] [FONT=Consolas][FONT=Consolas][FONT=Consolas]private[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]ObservableCollection[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]<[/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]KategorieVM[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]> KatAuswahl[/FONT][/FONT] [FONT=Consolas][FONT=Consolas]{[/FONT][/FONT] [FONT=Consolas][FONT=Consolas][FONT=Consolas] get[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] { [/FONT][/FONT][FONT=Consolas][FONT=Consolas][FONT=Consolas]return[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas] _katAuswahl; }[/FONT][/FONT] [FONT=Consolas][FONT=Consolas][FONT=Consolas] set[/FONT][/FONT][/FONT][FONT=Consolas][FONT=Consolas]{[/FONT][/FONT] [FONT=Consolas] [FONT=Consolas] _katAuswahl =value[FONT=Consolas][FONT=Consolas];[/FONT][/FONT][/FONT][/FONT] [FONT=Consolas][FONT=Consolas] }[/FONT][/FONT] [FONT=Consolas][FONT=Consolas] }[/FONT][/FONT]
Code:katAuswahl.Add()
Danke und Gruss
Nemoc
-
Fühle mich heimisch
- 14.04.2011, 11:24
- #2
Hast du bei der ersten _katauswahl irgend ein new ObservalCollection<KategoriVM>
Mit der kostenlosen PocketPC.ch App von meinem HD7 T9292 aus geschrieben.
-
entwickelt Apps
- 14.04.2011, 11:51
- #3
Oh Mann.. Komme mir gerade ziemlich doof vor ^^
Code:private ObservableCollection<KategorieVM> _katAuswahl = new ObservableCollection<KategorieVM> ();
Danke vielmals =)
Ähnliche Themen
-
Programme kopieren
Von Andre2903 im Forum HTC HD7Antworten: 17Letzter Beitrag: 05.12.2010, 20:59 -
Kontakte kopieren
Von extend im Forum HTC Desire SonstigesAntworten: 2Letzter Beitrag: 15.09.2010, 06:37 -
Termine kopieren
Von 14er im Forum HTC Touch Diamond 2Antworten: 5Letzter Beitrag: 10.06.2010, 19:42 -
Text kopieren
Von Lamis im Forum HTC Touch DiamondAntworten: 3Letzter Beitrag: 19.02.2009, 20:40 -
SMS Kopieren
Von musicwowa im Forum HTC Touch DiamondAntworten: 6Letzter Beitrag: 09.01.2009, 21:08
Pixel 10 Serie mit Problemen:...