tags:

views:

41

answers:

1

I would like to serialise a collection of Custom objects in the Settings file of WPF application. I am able to serialise a single Custom object by deriving from ApplicationSettingsBase, however I am unable to serialise a collection of these objects. Could you please help?

Thanks in advance!

public class TestSetting: ApplicationSettingsBase { [UserScopedSetting] public string Name { get { return (string) this["name"]; } set { this["name"] = value; } } }

+1  A: 

You can create a class derived from ApplicationSettingsBase, in which you can put your collection as a property and each and every Class inside the collection can be just [Serializable()].

Jobi Joy