Practical solutions

C# Howtos How-To Guides

Solve the problem. Keep building. Collection of C# how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Create the Auto Property in C#This tutorial defines how to create and modify the auto property in C#. How to Read Barcode in C#This article briefly discusses reading Barcode from an image using C#. How to Seed a Random Class in C#This tutorial summarizes how to seed a random class in C#. How to Delete All Files in a Directory in C#There are two main methods that can be used to delete all the files inside a directory in C#, the FileInfo.Delete() function and the DirectoryInfo.Delete() function. Thread Safe List in C#There are two main methods that can be used to create a thread-safe list in C#, the ConcurrentBag class, the ConcurrentQueue class, and the SynchronizedCollection class. How to Update Dictionary Value in C#This tutorial demonstrates how to update values in a C# dictionary by using a key as an index How to Get List Length in C#This tutorial demonstrates how to get the number of items in a C# List by using the count function C# Convert Int to CharThis tutorial teaches how to cast int to char in C#. How to Initialize Array of Objects in C#In this article, explains how to initialize an array of objects through Constructor parameters in C#. How to Convert IEnumerable to List in C#In this tutorial, learn the different methods of converting IEnumerable to list in C#. Use the ToList(), ToArray(), and AsEnumerable() method. Create Map and Reduce Functions in C#This tutorial elaborates how to create and use map and reduce functions in C#. Integer Division in C#This tutorial discussed the methods to perform integer division in C#. There are 3 types of divisions in C#: the integer division, the floating point division, and the decimal division. How to Convert a Dictionary to JSON String in C#This article teaches how to convert a Dictionary to a JSON string in C#. How to Format a String With Fixed Spaces in C#This tutorial explains how to format a string with fixed spaces or padding in C#. How to Convert Double to Decimal in C#This article will discuss converting a double to a decimal using the C# programming language. How to Get the Current Username in .NET Using C#In this article, you will learn how to get the currently logged-in user's name in .NET using the C# programming language. How to Get the Unix Timestamp in C#This how-to article shows different methods to get the unix timestamp in C#. It introduces methods like DateTime.Now.Subtract().TotalSeconds, DateTimeOffset.Now.ToUnixTimeSeconds() and TimeSpan Struct How to Convert Int to Enum in C#This article introduces how to convert int to enum in C#. It includes type casting. HashMap in C#This article introduces hashmap equivalent in C#. It includes Dictionary collection. How to Calculate the Difference Between Two Dates in C#Calculate difference between two dates (number of days) in C# How to Get Int Value From Enum in C#This tutorial demonstrates how to get int value from enum type in C# in several methods with thorough description and examples. How to Enumerate an Enum in C#This tutorial introduces how to enumerate an enum value in C# using different types of methods. How to Round a Double Value to an Integer Value in C#There are three main methods that can be used to round up a double value to an integer value in C#, the Math.Ceiling(), the Math.Floor(), and the Math.Round() functions. How to Get Dictionary Value by Key in C#There are 2 main methods that can be used to get dictionary value with the key in C#, the [] method, and the TryGetValue() function.