Skip to content

Instantly share code, notes, and snippets.

@tany3
Last active August 29, 2015 13:56
Show Gist options
  • Save tany3/9068724 to your computer and use it in GitHub Desktop.
Save tany3/9068724 to your computer and use it in GitHub Desktop.
T ? vs Nullable<T>

T ? vs Nullable

C#ではNullableと書く必要はなく、T?と書いて良い。

In C#, it is not necessary to use the full Nullable type name because the language allows you to write T? instead. >Consequently, ReSharper offers the option to replace the long type name with the shorthand.

###変更前

Nullable<DateTime> t;

###変更後

DateTime? t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment