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# .

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 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# ?