Public · Protected · Private
Nullable variables
Type: Public  |  Created: 2012-06-12  |  Frozen: Yes
« Previous Public Blog Next Public Blog »
Comments
  • Nullable<int> nullableInt = 10; int? a = 10; Nullable<double> nullableDouble = 3.14; double? b = 3.14; Nullable<bool> nullableBool = null; bool? c = false; Nullable<char> nullableChar = 'a'; char? d = 'd'; Nullable<int>[] arrayOfNullableInts = new int?[10];
    2012-06-12 11:25
  • int x = foo() ?? 100; if foo's return value is nullable And then if it is null , it will be replaced with 100
    2012-06-12 11:27
This blog is frozen. No new comments or edits allowed.