Tag: foundation
How to Allow Null Values for Integer in C# ?
In order to allow null values to an integer or for any value types , we need to make the data type as Nullable<T> where T refers to type. How to Allow Null Values for Integer in C# ? There are 2 ways you can set null value to value types in C# .
Example of Enumeration in C#
Below is a sample code snippet that demonstrates how to declare , define and access the Enumeration in C#. Example of Enumeration in C#
How to replace a File extension in C# ?
If you want to replace a file extension in C# , you can use the ChangeExtension method defined in the System.IO.Path class. Below is a sample code snippet demonstrating how to do it. How to replace a File extension in C# ?
How to Convert byte[] to hex string in C# ?
To convert a byte array to hexadecimal string, you can use the BitConverter class in C#. How to Convert byte[] to hex string in C# ? Below is a sample code snippet demonstrating how to achieve this.
How to Create a Guid Value in C# ?
If you want to create a new Guid value in C# which is random , you can use the Guid class to achieve it. Below is a sample code snippet demonstrating how to do it. How to Create a Guid Value in C# ?