How to Catch All Exceptions in C# & Find All Application Errors

Matt Watson Developer Tips, Tricks & Resources

Exception handling is a critical component of every software application. The last thing you want your users to see is errors, or even worse, your application crashing. In this article, we will discuss how to find and catch all exceptions in C# applications. .NET provides several different ways to catch exceptions and view unhandled exceptions. Topics in this article: Catching …

Global Exception Handler with C# Web API

How to Handle Global Exception Handler with C# Web API

Charris Herrera Developer Tips, Tricks & Resources

Exception handling is a critical process for every software application. Imagine an application where users often see weird errors or an application that is constantly crashing. When exceptions remain unhandled, your application is quickly heading toward demise. Fortunately, as long as exceptions are handled correctly they are recoverable, and you’ll learn how as you read on. This article focuses on …

The Ultimate List of C# Tools: IDEs, Profilers, Automation Tools, and More

Charris Herrera Developer Tips, Tricks & Resources

C# is a widely used programming language in enterprises, especially for those that are heavily Microsoft-dependent. This language comprises a lot of tools with individual strengths. Here, we list C# tools for IDEs, profilers, automation tools, and more. If you build apps using C#, you most likely use Visual Studio and have explored some of its extensions to supercharge your …

What is C# used for?

What is C# used for?

Matt Watson Stackify Product & Company Updates

As a developer, there are things you have to learn about C# programming. In this entry, let’s take a look at its basic attributes and why it remains so popular.  C# programming language is a modern programming language. It derives its characteristics from its predecessors like C and C++. It can perform a wide range of tasks and processes across …

C# Exception Handling Best Practices

Matt Watson Developer Tips, Tricks & Resources

Welcome to Stackify’s guide to C# exception handling. In this article we cover the following topics: Basics about C# Exceptions, including examples Common .NET Exceptions How to Create Your Own Custom C# Exception Types How to Find Hidden .NET Exceptions C# Exception Logging Best Practices Why is this topic so important? In modern languages like C#, “problems” are typically modeled …

The Best C# Tutorials

Learn C#: Tutorials for Beginners, Intermediate, and Advanced Programmers

Angela Stringfellow Developer Tips, Tricks & Resources

Are you trying to teach yourself to code? Or are you already an experienced developer who wants to pick another language? In both cases, you know how frustrating it can be to find good tutorials online. Sure, it’s easy to find “tutorials”, but separating the chaff from the wheat is a whole different story. Of course, you have to pick …

C# Garbage Collection Tutorial

Carlos Schults Developer Tips, Tricks & Resources

Garbage collection is a key component of many modern programming languages, including C#. It’s even hard to imagine what programming would look like in C#, and other modern languages like Java, Ruby, and many others, without this tool. Despite being a valuable asset that makes a better programming experience, garbage collection can still give you a hard time, specifically with …

What is C# Reflection?

How C# Reflection Works With Code Examples

Alexandra Altvater Developer Tips, Tricks & Resources

Reflection is when managed code can read its own metadata to find assemblies. Essentially, it allows code to inspect other code within the same system. To illustrate, Java’s static typing system isn’t designed to support the “doSomething” method unless the object conforms to a known interface. But with reflection, your code can view the object and find out if it …

What are OOP Concepts in C#?

OOP Concepts in C#: Code Examples and How to Create a Class

Alexandra Altvater Developer Tips, Tricks & Resources

Object oriented programming (OOP) is a programming structure where programs are organized around objects as opposed to action and logic. This is essentially a design philosophy that uses a different set of programming languages such as C#. Understanding OOP concepts can help make decisions about how you should design an application and what language to use. Everything in OOP is placed …

Learn how to support and show performance

Understanding & Profiling C# Async Await Tasks

Matt Watson Developer Tips, Tricks & Resources, Stackify Product & Company Updates

Microsoft and the .NET community have made asynchronous programming very easy with their implementation of async await in C#. The latest versions of ASP.NET heavily utilize it to improve performance. Many performance monitoring and profiling tools struggle to support and visualize the performance of asynchronous C# code. Stackify’s Prefix & Retrace products both have excellent support for applications using C# async await. …

What's a C# Throw Exception?

How to Throw C# Exceptions Like a Major League Pro: Examples, Best Practices, and Everything You Need to Know

Alexandra Altvater Developer Tips, Tricks & Resources

Practically everyone who has ever used a web page or an app has encountered an exception at one point or another, but they probably didn’t realize what it was. Exceptions are pretty common ways to handle unexpected inputs but are they always the right way to handle such problems? In this post, we’ll take a closer look at C# exceptions, …

C# Queue, Methods, and Operations

What Is a C# Queue? How It Works, and the Benefits and Challenges of Working with C# Queues

Alexandra Altvater Developer Tips, Tricks & Resources

At Stackify, we recently blogged about best practices for C# logging. Today, let’s take a look at another useful capability, the C# Queue. A Definition of C# Queue The C# queue is a FIFO queue collection class in the System.Collection namespace. Storing elements in FIFO style (First In, First Out), the C# queue contains elements in precisely the order they were …

Microsoft.Extensions.Logging

How to Use LoggerFactory and Microsoft.Extensions.Logging for .NET Core Logging With C#

Matt Watson Developer Tips, Tricks & Resources

If you have used .NET Core, you have probably battled with the new built-in .NET Core LoggerFactory which is in Microsoft.Extensions.Logging. It has created a lot of confusion around logging with ASP.NET Core. At Stackify, we have logging integrations for log4net, NLog, Serilog, and our direct API. We have a lot of experience with building logging appenders and libraries to work with various …

Unit Test Frameworks Best Practices

Unit Test Frameworks for C#: The Pros and Cons of the Top 3

Erik Dietrich Developer Tips, Tricks & Resources

If you enjoy the subject of human cognitive biases, you should check out the curse of knowledge.  When dealing with others, we tend to assume they know what we know.  And we do this when no justification for the assumption exists. Do you fancy a more concrete example?  Take a new job and count how many people bombard you with company jargon …