Filter by Tags

C# - What are nullable types in C#



0 0
This Question is relate to a Discussion :

In C# what is the use of nullable types ? How can we create a nullable type variable in C# ?

Ravinder Singh
Posted on : Wed, Aug 16, 2017
Views : 156

Ask Question

If you want to ask question you must LogIn or SignUp
Login SignUp

Answers (1)

Nullable types are the ones which are used to assign valued data types with null value.

int? a= null;

since int is a valued data type, it cannot have null value. Suppose we retrieve data from the database and an attribute as a NULL value. If the attribute is of type int or any other valued data type it would create a problem. Therefore we use nullable type so that it can accept a null value.
Apurva Thakker
Wed, Aug 16, 2017

Edit Answer

This answer will permanently deleted. Do you really want to delete this Answer ?
To Add your Answer Please
LogIn | SignUp

Quick Links



Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..


Login to Open ESchool OR Create your account    Login   SignUp