Tag: c#

Formatting Number with Leading Zeroes in C#

The .NET Framework provides the format strings like “D” and “X” which can be easily used by the developers to format the number with leading zeroes in C#. For example , assume that the number …

Different Ways to get the computer name in c#

There are different ways in which the developers can get the computer name in their .NET application using C#. Using the MachineName property defined in the Environment class. Using the GetHostName method defined in the …