Author: Marinko Spasojevic

C# Back to Basics – Recursion and Recursive Methods

In this article, we are going to talk about Recursion and Recursive Methods in C#. Furthermore, we will learn how to use recursive methods and how they differ from the regular methods. For the complete navigation of this series check out: C# Back to Basics. If you want to download the source code for our examples, you can do that from here Recursive Methods in C# Source Code. So what is recursion? Recursion is a concept in which method calls itself. Every recursive method needs to be terminated, therefore, we need to write a condition in which we check...

Read More

C# Back to Basics – Ref and Out Keywords in C#

In this article, we are still going to talk about methods but from a different perspective. We are going to learn how to pass our arguments by using the ref and out keywords. For the complete navigation of this series check out: C# Back to Basics. If you want to download the source code for our examples, you can do that from here Ref and Out Keywords Source Code. This article is divided into several sections: Using Ref and Out Keywords Example 1 for the Value Type Example 2 for the Reference Type Conclusion In the previous post, we...

Read More

C# Back to Basics – Methods in C#

Hello and welcome to the Methods in C# article in which we are going to talk… well about methods :D. Furthermore, we are going to learn how to use methods in C#, what is the method signature, and how to use parameters and arguments. For the complete navigation of this series check out: C# Back to Basics. If you want to download the source code for our examples, you can do that from here Methods in C# Source Code. In this article, we are going to talk about: Method Signatures Parameters and Arguments Optional Parameters Conclusion In our previous...

Read More

C# Back to Basics – Access Modifiers in C#

In this article, we are going to explain different types of access modifiers in C# and what their purpose is. For the complete navigation of this series check out: C# Back to Basics. Access modifiers specify the accessibility of an object and all of its members in the C# project. Moreover, all the C# types have access modifiers implemented, even if they are not stated (default access modifier is applied then). Even though this topic is more related to the object-oriented concept, we will talk about it now, thus making easier to understand the next article about methods which...

Read More

C# Back to Basics – Handling Exceptions in C#

In this article, we are going to learn how to use try-catch blocks while Handling exceptions in C#. Moreover, we are going to learn how to use multiple catch blocks to handle more specific exceptions in our code. For the complete navigation of this series check out: C# Back to Basics. If you want to download the source code for our examples, you can do that from here Handling Exceptions in C# Source Code. This post is divided into several sections: What is Exception Try-Catch Block Specific Exceptions Conclusion What is Exception The exception is a problem that appears...

Read More