c#

c#

C# program to convert a binary value to decimal

C# program to convert a binary value to decimal. We will learn three different ways to do the conversion. By using a loop, recursively and by using Convert.ToInt32 method.

Read
c#

4 different C# programs to convert a decimal number to binary

C# program to convert a decimal value to binary in 4 different ways, by using an array, by using a StringBuilder object, recursively and by using Convert.ToString method.

Read
c#

C# program to create an array of objects

C# program to create an array of objects. Learn how to create objects from classes in C# and how to create an array of different objects in C#.

Read
c#

C# String.ToUpper method explanation with example

C# program example of string.ToUpper method. ToUpper method is used to convert a string to uppercase. Let's learn it with an example.

Read
c#

C# string.ToLower method explanation with example

C# program example of string.ToLower method. ToLower method is used to convert a string to lowercase. Let's learn it with an example.

Read
c#

C# program to remove the last n characters from a string

C# program to remove the last n characters from a string. Learn to do it by using Remove and by using Substring methods.

Read
c#

C# program to remove first n characters from a string

C# program to remove the first n characters from a string. We will learn two different ways to do that in C#.

Read
c#

C# program to check if a number is armstrong or not

C# program to check if a number is armstrong or not. It will take one number and print if it is armstrong or not.

Read
c#

How to print yesterday's date in C#

C# program to print yesterday's date. DateTime struct provides the current day and also we can use it to get yesterday's date.

Read
c#

How to print tomorrow's datetime in C#

C# program to print tomorrow's datetime. DateTime struct provides the current day as Today. We can add days by using AddDays method.

Read