All pastes #619140 Raw Edit

Meins

public text v1 · immutable
·published 2007-07-14 14:11 UTC
rendered paste body
using System.Configuration;
using System.Collections;

namespace ShowCase.Forms
{
    public class UserSettings : ApplicationSettingsBase
    {
        [UserScopedSetting()]
        [DefaultSettingValue( "" )]
        public Hashtable imagePath
        {
            get
            {
                if( !settings.ContainsKey( "imagePath" ) ) settings[ "imagePath" ] = new Hashtable(); // <- fix

                return (Hashtable)settings[ "imagePath" ];
            }
            set
            {
                settings[ "imagePath" ] = value;
            }
        }

        private Hashtable settings = new Hashtable();
    }
}