Using of [ExcludeFromState] attribute to hide fields in the viewer?

Jan 28, 2009 at 8:39 AM
There are some class fields which I do not want to appear in the viewer. For instance, I have an objects counter, that generates a unique id to each newly created object ( i.e.: static int userNextId = 1; ). I don't want that this counter will appear in the viewer when looking at a state's properties. Is the right way to achieve this is by adding the [ExcludeFromState] attribute to that field?