dotnetomaniak.pl - Artykuły z tagiem c# attributes

Today I (again) focus on the attributes that will make your debugging less painfull :). This time my scribbles should appeal to the programmers who prefer keeping their code clean (and adhere to the principle: the less ‘spare’ code the better). So grab a mug of whatever you like and take a look at DebbugerBrowsable and DebuggerDisplay. The first one may be a good alternative to DebuggerTypeProxyI described in previous post and the second one is just ‘a must’ (really!) that makes life easier.

C# attributes you should know #3: [DebbugerBrowsable] and [DebuggerDisplay] – A Girl Among Geeks

Inne 2517 dni, 5 godzin, 53 minuty temu AGirlAmongGeeks 147 źrodło rozwiń

[DebuggerTypeProxy] is very useful attribute when you have a class that inherits from another class and that one inherits from another one, and some of the classes contain collections of items and hundreds of properties that in fact are not important to you… Strictly speaking, when displaying class’ members while debugging makes you feel like quitting the job. [b]We decide how to display object while debugging[/b] Exactly! You can set a proxy that will inform debugger how you want a type to be displayed...

C# attributes you should know #1: [DebuggerTypeProxy] – A Girl Among Geeks

Inne 2534 dni, 5 godzin, 20 minut temu AGirlAmongGeeks 176 źrodło rozwiń

C# Attributes are very popular for ‘decorating’ assembly with some additional data, usually influencing on the application’s behavior or the way data are managed. You probably already used at least some of them – Obsolete, Serializable, Required, Display, MaxLength, RegularExpression, WebMethod are only a few of hundreds available in .Net world. What is more, you can write your own custom attribute and use it like a build-in one. I will write more about this in the next post. Right now, let’s focus o...

Dziel się z innymi:
C# Attributes – introduction – A Girl Among Geeks

Sztuka programowania 2598 dni, 5 godzin, 50 minut temu AGirlAmongGeeks 168 źrodło rozwiń