Filter by Tags

C# - What are nullable types in C#

Votes

0

0 0
This Question is relate to a Discussion :
Problem

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
Comments

Ask Question

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

Answers (1)


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

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
Loading...
Comments

Edit Answer

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

Quick Links

E-Magazines

@

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

Ok

Login to Open ESchool OR Create your account    Login   SignUp