Cool Visual Studio 2017 Tip #4 : Templates
I was recently watching an interesting C#7 video by Jesse Liberty and noticed that within it, he was using his own project type to demonstrate the new features of the…
I was recently watching an interesting C#7 video by Jesse Liberty and noticed that within it, he was using his own project type to demonstrate the new features of the…
One thing that I think differentiates someone who uses Visual Studio a lot from someone that doesn’t is whether they are familiar with the key strokes and short-cuts available to…
You may already know this, but when you compile one of your .NET projects into an executable, it is actually translated into something called Intermediate Language, or IL. If you…
There have been some interesting improvements in how the using statement can be, erm, used, in C#7, which may be of interest to some. To set the scene, let’s look…
Fancy having a nice fav icon on your web application as that finishing touch? It’s easier than you think. Let’s assume you have an image in mind. If not, quickly…
One of the things that I love about IT is that it (small this time) is like a huge puzzle. I’ve probably said this before, but I get enormous satisfaction…
One of the things I like best about my job is the puzzle solving aspect of it. As a huge fan of the Arthur Conan Doyle books, I often think…
I mentioned in a previous post that I have begun reading Programming Pearls by Jon Bentley. There’s so much to say about this book but one solution in particular really…
Like many of you (yes, I know who you are), I’ve used Adobe’s Acrobat Portable Document Format – PDF – many times. How can you not? When it used to be…
I remember once being told a long time ago that someone famous said that the littlest things mean the most. They were talking about people and how those small gestures…
This is the sixth website of my project to create 30 ASP.NET websites, highlighting various aspects of this amazing technology! For this project, I wanted to do something with databases…
This is the fifth website of my project where I practise using elements of ASP.NET in order to exercise my world-changing ideas 🙂 Looking at it now, you might think I had…
This is a brief (and simple) introduction on how to add an ASMX service to your Visual Studio C# project. Before you begin, however, be aware that this type of…
Much like my article on using extension methods, I want to talk about another cool feature of C# known as delegates, but to make it more useful, I want there…
What do you think this does?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
class Program { static void Main(string[] args) { Console.WriteLine("Return Value = {0}", DummyFunction()); } static int DummyFunction() { try { return 1; } finally { return 2; } } } |
The finally block is guaranteed to run after the try block, but….and it’s a BIG but, hasn’t it already returned a value? First, have a…