.Net Framework

C# DateTime

C# DateTime

C# DateTime class of the .NET Framework allows you to use, store, and manipulate data of time and date. It ...
Read More

Date Difference Calculator

This tutorial guides you through the creation of a Time Difference Calculator which determines the difference of two given dates ...
Read More

The System.Math Class

You can use the System.Math class to perform certain mathematical calculations. You can use its method to round numbers, get the square ...
Read More

Random Number Generation

We use the System.Random class to generate random numbers. The Random class provides a method for generating random numbers. Each number has an equal ...
Read More

Strings and Regular Expressions

String is the most common data type found in almost any programming languages. A string is a group of characters ...
Read More

System.String Class

The string in C# is handled by the System.String class. Before you can create and use strings, you must import the System namespace. There ...
Read More

Comparing Strings

We can compare two strings for equality using several ways. For example, we can use the == operator to test if the ...
Read More

String Concatenation

There are several ways of concatenating strings. Concatenating simply means combining multiple strings into one. In C#, the simplest way ...
Read More

Inserting Strings

.NET provides you with the Insert instance method that allows you to insert strings into existing strings. For example, If you have ...
Read More

Trim String

Sometimes, a user types unnecessary spaces that may cause certain errors. When accepting strings from a user, especially if the ...
Read More

Splitting Strings

If you want to split a string into multiples strings, you can use the Split method. Let's take a look at the ...
Read More

Searching Strings

Searching strings have been made easy thanks to the different methods provided by .NET. Let's take a look at the ...
Read More

Extracting, Removing, and Replacing Strings

If you want to extract a part of a string, you can use the Substring() method. The Substring() method accepts two arguments, ...
Read More

Casing Strings

You can change the casing of a string. For example, a string composing of lowercase letters can be transformed into ...
Read More

String Formatting

.NET provides you with ways to format the output of strings. You can use the String.Format to format your strings using different ...
Read More

C# StringBuilder

The System.String class can use the + operator to concatenate two strings. But this is inefficient when concatenating two different strings. The reason is ...
Read More

C# Regular Expressions

Sometimes when getting input from the user, you need to check if it follows a certain pattern. For example. consider ...
Read More

Validation Using Regular Expressions

Regular expression is a great way to validate data provided by a user to the  fields of a form. Suppose ...
Read More

C# File System

Most of the time, you will need to be able to write your data to files for permanent storage. You ...
Read More

Absolute and Relative Paths

Files and directories can be uniquely identified using their path names. Path  names specify where files and directories are located ...
Read More