4

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

Adam Jensen
  • 541
  • 1
  • 10
  • 25
Muath
  • 4,351
  • 12
  • 42
  • 69

1 Answers1

11

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

Community
  • 1
  • 1
gaurav5430
  • 12,934
  • 6
  • 54
  • 111