1

What does the question mark (?) in the following method declaration mean?

public ActionResult Details(int? id)
cldev
  • 671
  • 8
  • 18
  • I've linked to a pre-existing question with great answers; for info, I simply searched for "c# question mark after type" – Marc Gravell Oct 02 '20 at 14:46

1 Answers1

3

It means that int variable is nullable.

So, you can place a null value in the variable.

You can see more here

Esteban
  • 146
  • 1
  • 6