Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the question mark in "Decimal?" mean? [duplicate]

Tags:

c#

I am following tutorials about MVC4 asp.net. The tutorials are using Decimal like this:

     public Decimal x{ set; get; }
     public Decimal? y{ set; get; }

what does it mean when using ? after Decimal

like image 271
Muath Avatar asked Dec 26 '22 16:12

Muath


1 Answers

It means that the value type in question is a nullable type

see here

What is the purpose of a question mark after a type (for example: int? myVariable)?

like image 82
gaurav5430 Avatar answered Jan 06 '23 13:01

gaurav5430