Re: Constants Array of "Structs"

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



smartkid wrote:
public readonly static TDBField[] gcaDBFields

The gcaDBFields is not really readonly, the client code can still change the element of that array.

To get a real constant array-like object, use ReadOnlyCollection instead of
an array.

You're right only gcaDBFields can not be assigned in user code but all fields are not read-only.

It's a pity, if there is no simpler declaration of constant array :-(

Thank You & Regards
Marcin
.