G Guest Sep 7, 2005 #1 I need to assign null values to datetime fields Where I can find types like NullableDateTime or NullableInt. TIA
I need to assign null values to datetime fields Where I can find types like NullableDateTime or NullableInt. TIA
M Mattias Sjögren Sep 7, 2005 #2 I need to assign null values to datetime fields Where I can find types like NullableDateTime or NullableInt. Click to expand... The types are DateTime? and int? (i.e. the non-nullable value type with a question mark appended to it). Mattias
I need to assign null values to datetime fields Where I can find types like NullableDateTime or NullableInt. Click to expand... The types are DateTime? and int? (i.e. the non-nullable value type with a question mark appended to it). Mattias
R Richard Blewett [DevelopMentor] Sep 7, 2005 #3 The Nullable support is implemented in terms of generics so you'd be looking at Nullable<int> i However, C# has a new syntax to save you some typing using ? do you'll have int? i = null; DateTime? d = null; Regards Richard Blewett - DevelopMentor http://www.dotnetconsult.co.uk/weblog http://www.dotnetconsult.co.uk I need to assign null values to datetime fields Where I can find types like NullableDateTime or NullableInt. TIA [microsoft.public.dotnet.languages.csharp]
The Nullable support is implemented in terms of generics so you'd be looking at Nullable<int> i However, C# has a new syntax to save you some typing using ? do you'll have int? i = null; DateTime? d = null; Regards Richard Blewett - DevelopMentor http://www.dotnetconsult.co.uk/weblog http://www.dotnetconsult.co.uk I need to assign null values to datetime fields Where I can find types like NullableDateTime or NullableInt. TIA [microsoft.public.dotnet.languages.csharp]