Hi,
You could get the error that you are seeing if _mru has not been instantiated.......
UPDATE : Just read your UPDATE :-}
Glad you got it working.....
>Hi Viv,
>this is the code - the entire class is too big to post here
>
>
>[Description("Specifies the length of the MRU history file."),DefaultValue(20)]
>public int MaxFiles
>{
> get { return _maxFiles; }
> set
> {
> if (!DesignMode && !_isInitializing)
> {
> throw new Exception("The 'MaxFiles' can be only set in Design Mode");
> }
> _maxFiles = value;
> _mru.Capacity = _maxFiles;
> }
>}
>
>
>there is a private field _maxFiles of type int in the class. The actual class works perfectly and has done so for years, it was only recently when I tried to change the value the problem showed itself. The default value of 20 is shown in the property sheet.
>
>
>Update.
>
>Viv I sussed it - the variable _mru is an ArrayList which hadn't been instantiated. It was declared thus:
>
>
> ArrayList _mru;
>// I changed it to
>ArrayList _mru = new ArrayList(); // All is fine now.
>
>
>Thanks for your time.