-1

Could someone please tell me what the ? symbol means in the following code:

  public Rectangle? Limits
    {
        get
        {
            return _limits;
        }
        set
        {
Lucas
  • 3,376
  • 6
  • 31
  • 46
Pectus Excavatum
  • 3,593
  • 16
  • 47
  • 68

2 Answers2

3

It is syntactic sugar for specifying a nullable type.

Robert Groves
  • 7,574
  • 6
  • 38
  • 50
3

It means it is a nullable type.

For example, DateTime? can be null, whereas DateTime cannot.

darth_phoenixx
  • 932
  • 12
  • 23