New year, new me… Just kidding, no running or yoga plans, but I decided to have a (temporary) break with ‘C# attributes you should know’ series and start with a brand new one – C# facts that somehow surprised me. For the first article, I will show you how (friendly looking, always helpful, good guy) enum can become an asshole. An asshole who will steal your precious time!
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 DebuggerTypeProxy I described in previous post and the second one is just ‘a must’ (really!) that makes life easier. Continue Reading
Last time I wrote about C# attribute DebuggerTypeProxy that helps us customize the way we display our type’s data while debugging. Today I would like to introduce you to the world of attributes that helps you skip some parts of code while debugging. Most of the C# programmers probably know them well, but I realized that only a few can tell the differences between them. So, ladies and gentlemen, let me introduce you the DebuggerStepThrough and DebuggerHidden. Continue Reading
[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. Continue Reading
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 on… Continue Reading
In the last post I wrote about one of the .Net Core 2.0 features – Razor Pages. Today, we will crawl a little bit in this mud… I mean, we will write some code.
I chose a simple BMI calculator as a demo project (you can download the code from github). You know, 2 inputs and the code-behind that will tell us if we are very fat or just slightly fat or we are OK and it’s time for another cookie. Because, there is always a time for a cookie, no matter what! Continue Reading
Last week I mentioned that with .Net Core 2.0 we got something that makes my jaw drop. This “little” feature that made me feel slightly uncomfortable is Razor Pages. In this post, I will show you what it really is or, in fact, what it is not 😊 and if we should be afraid of it. Continue Reading
This is the third article in the series of the last Microsoft releases and this time I will focus on Visual Studio update – labeled ‘15.3’. I am usually easily pleased with most of the Microsoft IDE features so forgive me all of my ‘ohhh’ but I really love all this changes 😉.
At Monday, we had a highly anticipated release – .Net Core 2.0 ! If it is not enough, we also got a new version of Visual Studio 2017 – update 15.3 (and I will write about it in the nearest feature). So now, I will try to show you the most interesting features of the youngest .Net kid. Continue Reading
When I started learning .Net Core some time ago I was constantly encountering a ‘.Net Standard’. I knew what it means and that it is (somehow 😉 ) important for me but didn’t really care about it. It’s just the standard, right? Who would care about it, when there is so many new things to discover (yep, I was an ignorant!). I changed my mind the last week – when the .Net Standard 2.0 was finally released.
So, what the .Net Standard is?
It is the standard common for every .Net technology. It ensures that your app/library is compatible with all the .Net technologies (ex. asp.net core, asp.net, xamarin) so you can reuse the same piece of code in more than one product without a need of recompiling it. Continue Reading