Home

Posts

C# Code Snippets Enumerations

C# Enumerations

In this code snippet, we will see how to use enumerations in C#. An enum is a data type. To create an enumeration you have to give it a name…
C# Code Snippets Method Output Parameters

C# Method Output Parameters

In this code snippet, will see how to use method output parameters in C#. The output parameter works by passing in a reference of the variable you provide. It is…
C# Code Snippets Anonymous Methods

C# Anonymous Methods

In this code snippet, we’ll take a look at anonymous methods in C#. Anonymous methods don’t have names(obviously). They can be defined with the delegate keyword or by using the…
C# Code Snippets Abstract Keyword

C# Abstract Keyword

In this code snippet, we’ll find out what the abstract keyword does in C#. Classes and their members such as methods, properties, … that are marked with abstract keyword aren’t…
C# Code Snippets Queue and Stack

C# Stacks And Queues

In this code snippet, we’ll take a look at queues and stacks in C#. Stacks and queues are similar to lists in the way that they don’t require their size…
C# Code Snippets List

C# List

In this code snippet, we’ll find out how to use lists in C#. Lists are similar to arrays, but unlike arrays, you can add and remove items from lists without…
C# Code Snippets Dictionary

C# Dictionary

In this code snippet, we’ll take a look at dictionaries in C#. Dictionaries can hold a collection of objects and are similar to lists. But unlike lists, the objects stored in the…
C# Code Snippets Iteration

C# Iteration

In this code snippet, we’ll find out how to iterate with the for, foreach, while and do while loop. What loops do is execute the code in their curly brackets(multiple times…

C# Unchecked

In this code snippet, we’ll find out what the unchecked keyword does in C#. The unchecked keyword is used to suppress arithmetic overflow exceptions. We will try to add two integers…

Advertisment ad adsense adlogger