in

Dé specialist in .NET trainingen en consultancy

Erik van Appeldoorn

ParenthesizePropertyName attribute

Last week during a training somebody asked me why some properties in the property windows of Visual Studio are decorated with brackets. It may sound stupid but I have never had a deep thougth about it. I guessed it has something to do with the sorting order of these properties, because these properties appear at the top of the sort order. So I thought it is just a trick to get the most important properties ar the top. Research showed me afterwards that's right, this is the only reason for these brackets. 

When developing components. You can do the same trick with your own properties, just decorate the properties you want to come up at the top with the ParenthesizePropertyName attribute.

[System.ComponentModel.ParenthesizePropertyName(true)]]

 

 

 

 

 

Published nov 14 2008, 10:14 by Erik
Filed under:

Comments

No Comments