Thursday, 23 November 2017

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>
public abstract class OdbcDataSourceProperty : GlobalSerializableBase, IComparable<OdbcDataSourceProperty>

Remove the abstract modifier and the problem will go away.

No comments:

Post a Comment