Adding bytes in C#
What happens if you run this little piece of code? More specifically, what's the type of the variable 'x'? byte b1=1; byte b2=1; var x=b1+b2; Console.WriteLine(x.GetType()); Well, if…
What happens if you run this little piece of code? More specifically, what's the type of the variable 'x'? byte b1=1; byte b2=1; var x=b1+b2; Console.WriteLine(x.GetType()); Well, if…
GroupBy() is one of the most versatile and underrated Linq standard query operator there is. You probably know the "base" version, which takes in a single parameter in the form of an expression…
A cool feature in VS2017: when implementing an interface, you can now use auto properties. Here's what I'm talking about: let's say you have an interface, and you have properties in it. Something like this:…
As an MCT I regularly teach courses of different levels. And I have to say, I love teaching — that's the most efficient way to learn :) A participant at one of my advanced courses brought me…
During one of my courses, and interesting question came up. Let's say you have a class definition like this: public class Test<T> { public void Method(T parameter) {} public void Method(int parameter)…