WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 02.10.2008, 14:40   #6
void
Hero
 
Benutzerbild von void
 
Registriert seit: 26.07.2001
Ort: Wien
Beiträge: 811


Standard

Danke, das wäre es gewesen! - Nur leider funktioniert das anscheinend nur gut mit primitiven Objekttypen und dem Vorhandensein von parameterlosen Konstruktoren. Da ich aber Collections und komplexe Objekttypen mit Konstruktoren mit Pflichtparametern verwende, bleibt mir nur die Möglichkeit, die Einstellungen selbst an die XML-Datei zu übergeben, oder eine eigene Einstellungs-Klasse zu erstellen, welche mit primitiven Typen auskommt...
Zitat:
Zitat von http://msdn.microsoft.com/en-us/library/ms950721.aspx
Q: How do I serialize collections of objects?
A: The XmlSerializer throws an exception when the collection contains types that were not declared to the constructor of the XmlSerializer. You can:
  1. Declare the types to the serializer by passing in a Type[] with the types to expect within the collection. OR
  2. Implement a strongly-typed collection derived from System.Collections.CollectionBase with an indexer matching the Add() method.
____________________________________
nobody is perfect

Geändert von void (02.10.2008 um 14:44 Uhr).
void ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 01:40 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag