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 Export DataTable to Excel in C#This tutorial will teach you how to export datatable to an excel file in C# programming language. How to Create Scheduled Tasks in C#The following article will guide you on scheduling tasks using the programming language C#. How to Get the Current Time in Milliseconds in C#This article explains getting current time in milliseconds in C#. How to Get Domain Name in C#This tutorial sums up how to get a domain name in C#. How to Get the Current Date Without Time in C#This how-to article shows different methods to get the current date without time in C#. It introduces methods like DateTime.Now.ToString(), DateTime.Now.Date.ToString(), DateTime.Now.ToShortString() and DateTime.Now.ToLongString() How to Join Two Lists Together in C#This how-to article shows different methods to join two lists together in C#. How to Pass Multiple Parameters to a Get Method in C#This how-to article shows different methods to pass multiple parameters to a get method in C#. It introduces methods like Controller Action, Attribute Routing and [FromQuery] How to Read a CSV File and Store Its Values Into an Array in C#This how-to article shows different methods to read a CSV file and store its values into an array in C#. It introduces methods like OpenRead(), ReadLine() and TextFieldParser How to Get the Current Folder Path in C#This how-to article shows different methods to get the current folder path in C#. It introduces methods like GetCurrentDirectory(), GetDirectoryName() and Environment.CurrentDirectory How to Write Data Into a CSV File in C#This how-to article shows different methods to write data into a CSV file in C#. It introduces methods like WriteRecords() and WriteAllText() How to Convert the Object to a JSON String in C#This how-to article shows different methods to convert a C# object to a JSON string in C#. It introduces methods like JavaScriptSerializer().Serialize(), JsonConvert.SerializeObject() and JObject.FromObject() C# Parse JSON in C#This how-to article shows different methods to parse a JSON with C#. It introduces methods like JsonConvert.DeserializeObject(), JObject.Parse() and JavaScriptSerializer().Deserialize() How to Get the Index of the Current Iteration of a Foreach Loop in C#This how-to article shows different methods to read a text file line by line in C#. It introduces methods like Select() and index variable method. How to Convert String to Int in C#This C# int to string how-to article shows different methods to convert an string to integer in C#. It introduces methods like Int32.TryParse() method, Convert.ToInt() method and Int32.Parse() method. How to Read a Text File Line by Line in C#This how-to article shows different methods to read a text file line by line in C#. It introduces methods like File.ReadLines(), File.ReadAllLines() and StreamReader.ReadLine() How to Identify if a String Is a Number in C#This how-to article shows different methods to identify if a string is a number in C#. It introduces methods like Enumerable.All(), Regex.IsMatch(), Int32.TryParse() and foreach Loop. How to Remove Item From List in C#This how-to article shows different methods to remove an item from the list in C#. It introduces methods like Remove(), RemoveAt() and RemoveRange() How to Convert Int to String in C#This C# int to string how-to article shows different methods to convert an integer to string in C#. It introduces methods like ToString method, Convert.ToString method, string formatting, and string concatenation method. How to Convert String to Enum in C#This C# string to enum how-to article shows different methods to convert a string to enum in C#. It introduces methods like Enum.Parse method, Enum.TryParse method, Enum.IsDefined and exception handling. Decimal Literal in C#This tutorial explains what a decimal literal is in C# and how it is used Key-Value Pair List in C#In this tutorial, we will learn about the properties of Key-Value pairs in C# and see how to create a key-value pair list. C# Macro Definitions in PreprocessorThis comprehensive guide explores C# preprocessor directives that offer similar functionalities as macros. C# Random BoolThis tutorial introduces the methods on how to generate a random boolean in C#. ArrayList vs List in C#In C#, ArrayLists store references of the object data type while Lists store values of some specific data type.