dotnet falcon

Blogging about .NET and software development - from my bird's eye view

.NET

Implementing the IFormatter interface

Implementing the IFormatter interface

Feb 28, 2019
One of the courses I teach is the standard Microsoft 70-483 exam preparation course. For some reason, the exam still has questions about how the BinaryFormatter and SoapFormatter components work (I'm not even going to try to guess why), so the training material also discusses the related concepts in detail.
Deserialize into interface

Deserialize into interface

Jun 12, 2018
Not long ago I was teaching a Programming in C# exam prep course. One of the modules involved serialization and a student asked me a question that was quite intriguing: Given the serialized form of an object, is it possible to deserialize it into an object if we only have
Dependency injection toolset upgrade

Dependency injection toolset upgrade

May 21, 2018
Dependency injection is probably the best thing in software development since slide bread. I often blog about related things and I also have a Visual Studio extension to help those who apply the principles in practice. Guard clauses in constructors An important piece of best-practice is that whenever you use
Adding logging using Mono.Cecil

Adding logging using Mono.Cecil

May 5, 2018
A while back (actually, it's been a long while) I found an interesting question on Stackoverflow. The question was about adding logging to method calls automatically. Or to rephrase: the question was basically about handling aspect-oriented programming using Mono.Cecil in .NET. So given this piece of code: public class
Throwback Thursday: Typed SQL reader

Throwback Thursday: Typed SQL reader

Apr 19, 2018
I've found an old HDD of mine and I got curious: what's on it? I had an old 3,5" HDD to USB adapter lying around and to my surprise, it was still working :) So I put the HDD in it, connected it to my 21st century notebook (actually, the
Adding bytes in C#

Adding bytes in C#

Nov 20, 2017
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 you guessed byte, you were wrong. This will actually result in an int. This was