Using the data set designer I have a bunch of returned fields which are read only.
For each of these it generates a property with both a get and a set. Ok, if any attempt is made to set the property it throws a "read only" exception.
I would prefer to be able to generate these as read only properties so my clients don't even have access to a "set" (at least on the typed row - though they could always cast it to a data row and do whatever they wanted anyway through it's columns.
So any idea how I might achieve this ?
[I can hypothsize as to the reason it is the way related to the point at which the typed rows are created since during initialization there has to be a set available, but this could only be achieved by having the constructor take all the fields]
For each of these it generates a property with both a get and a set. Ok, if any attempt is made to set the property it throws a "read only" exception.
I would prefer to be able to generate these as read only properties so my clients don't even have access to a "set" (at least on the typed row - though they could always cast it to a data row and do whatever they wanted anyway through it's columns.
So any idea how I might achieve this ?
[I can hypothsize as to the reason it is the way related to the point at which the typed rows are created since during initialization there has to be a set available, but this could only be achieved by having the constructor take all the fields]
Comment