Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Property value is not valid
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01468303
Message ID:
01468449
Vues:
25
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform