C#.NET Winforms PropertyGrid reports "Properties Window", "Index was outside the bounds of the array".

You may find when using the PropertyGrid in a C#.NET Winforms application that the PropertyGrid displays an alert with the title "Properties Window" and the message "Index was outside the bounds of the array" when you are editing a collection.



This is a somewhat misleading error as this can occur if you are modifying a Collection<T> where the object



/// <summary>
/// Represents an ODBC data source property.
/// </summary>
[Serializable]
[XmlRoot("Property")]
public abstract class OdbcDataSourceProperty : GlobalSerializableBase, IComparable<OdbcDataSourceProperty>
{


Remove the abstract modifier and the problem will go away.



Comments

Popular posts from this blog

SOLVED: Exchange Online Management PowerShell Connect-ExchangeOnline bug "A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles"

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

get-windowsfeature : The given key was not present in the dictionary