The Stack collection type is similar to other .NET collection types. It has it’s own use cases and is ideally suited to specific scenarios. In this post, I will demonstrate how to use the Stack collection type and go through some of the potential use cases. What is the Stack Collection Type? The Stack is a specialized collection that makes …
Everything You Need to Know About the .NET Queue Collection Type
The Queue collection type is a bit of a black sheep in the many different collection types. In some ways, it works exactly like you would expect any other .NET collection to work. However, in other ways, it seems to be very odd in its behavior. It will help if you remember that this is a Queue, not some ordinary …
Everything You Need to Know About the .NET Dictionary Collection Type
The Dictionary collection, just like all the other specialized .NET collection types, has a wide range of use cases that it is perfectly suited to. This can make it difficult to pick between the different types because in many cases, one of several will do just fine. After this post, you should be able to recognize when the Dictionary type …
Dealing With Command Line Arguments in C#
The Console Project template is often overlooked and rarely loved but, the power it possesses is amazing. If you don’t mind not working without a user interface, that is. Not all processes need human interaction, though. As a professional software developer, I have encountered many different scenarios where that is the case. I actually enjoy these projects because they have …
A List of Great C# Git Repos
Most Popular These repos are some of the most popular C# repositories. You are likely familiar with most of these by reputation at least. .NET Core – This is the granddaddy of C# open source projects. The .NET Core Framework. Roslyn – This is the project that performs code analysis for C# and Visual Basic. Mono – The original cross-platform …
An Introduction to System.Reflection
In this post, we will look at several common usage scenarios for System.Reflection. Late Binding Late binding is simply runtime binding. You may not have access to the assembly at compile time. You can likely expect it to appear a certain way. You have to know something about the assembly, after all. Late binding is common in systems that may have …
Top 10 Most Common C# Interview Questions
Through the years, I have been in hundreds of interviews and phone screens as the interviewer or interviewee. Here are 10 of my favorite questions with answers. Not all of these are strictly specific to C# and might target the .NET Framework or core programming concepts. What is C#? C# is a 3rd generation general purpose programming language created by …
Designing an Effective Exception Handling Strategy
In applications large and small, the role of exception handling is very rarely a first class experience. Instead, it is often haphazardly put together if thought about at all. In this post, we will explore some ideas about exception handling that are often considered best practices. For the purposes of this article, assume we are building a large-scale web-based application …
Shallow Copying vs Deep Copying in C#
In this article, I will show examples of shallow copying and deep copying in C#, we can examine the differences, and I will give you a few pointers. Shallow Copying and Deep Copying Shallow copying isn’t a new concept to most programmers. We do it all the time. Reference types (objects) are just a reference to a value on the …
Extension Methods 101
Extension methods have been available in the .NET Framework since 3.0. If you haven’t created one before, the chances are very high that you have at least used one, possibly without realizing it. In this post, we will explore what extension methods are, how to create them, and compare them to regular class methods. What are Extension Methods? Extension methods …
- Page 1 of 2
- 1
- 2