Digests » 221
Move faster with the automated cloud service for MongoDB. Built for agile teams who’d rather spend their time building apps than managing databases. Available on AWS, Azure, and GCP. Start free today.
You can see that ‘Debugging/Profiling’, whilst not a Fundamental or Secondary feature, still makes it into the list because of a ‘desire to create a complete programming environment’. The rest of this post will look at what Monitoring, Observability and Introspection features the Core CLR provides, why they’re useful and how it provides them.
Spot on animation that explains the difference between passing an object by reference and value.
Bing.com is a cloud service that runs on thousands of servers spanning many datacenters across the globe. Bing servers handle thousands of users’ queries every second from consumers around the world doing searches through their browsers, from our partners using the Microsoft Cognitive Services APIs, and from the personal digital assistant, Cortana. Our users demand both relevancy and speed in those results, thus performance and reliability are key components in running a successful cloud service such as Bing.
As we already know, .NET doesn’t allow developers to directly allocate the objects on the heap. Instead, the only thing the programmer needs to do is to use the new keyword – framework takes care of all the rest (placing the object on the proper heap, initializing it etc.). After that, you can simply forget about your object, because it is released (collected) automatically by the garbage collector as soon as it’s not needed anymore. But how does the GC know which objects it can collect?
A few days ago I stumbled across a C# code that was rethrowing the exception by means of passing captured exception object as an argument of the throw keyword (throw ex;). Such a pattern of rethrowing the exception can turn an exercise of troubleshooting a production issue into a game of “Find where the exception happened.”. I had to play this game a few times in my life and it is not the most fun game to play, especially if your codebase is quite large. So, here I want to take a minute and discuss what is the correct way to rethrow the exception in .Net.