由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - Q: c# datetime nullable objects
相关主题
求救一个小问题What's the simplest way to do a Linq join query ?
小菜鸟求助,PDF header signature not found.Net Formatting Objects Processor - NFOP
新手请教问题SOAP
C# DateTime to Oracle Date请问, ASP.NET 中, 2 个web form之间如何传参数?
add web service .Text 简易安装
觉得C#的valuetype和boxing真的是没有必要serialization problem
请教两个c# sql listview 问题Re: how to write an object into xml with
问个sql问题问题又来了.
相关话题的讨论汇总
话题: datetime话题: nullable话题: objects话题: null话题: fields
进入DotNet版参与讨论
1 (共1页)
w*s
发帖数: 7227
1
Hi in database i have Table1,
it has 2 fields, prevDay, currDay.
sometime the fields are null in database, not filled yet.
in the code i want to check if null or not 1st,
if ((DateTime)Table1.prevDay != (DateTime?)null)
when i run it, it says Nullable objects must have a value.
what's the correct way ?
also what's the difference between DateTime and DateTime?
thanks !
l*s
发帖数: 783
2
.HasValue

【在 w*s 的大作中提到】
: Hi in database i have Table1,
: it has 2 fields, prevDay, currDay.
: sometime the fields are null in database, not filled yet.
: in the code i want to check if null or not 1st,
: if ((DateTime)Table1.prevDay != (DateTime?)null)
: when i run it, it says Nullable objects must have a value.
: what's the correct way ?
: also what's the difference between DateTime and DateTime?
: thanks !

w*s
发帖数: 7227
3
worked, thanks ! :)

【在 l*s 的大作中提到】
: .HasValue
1 (共1页)
进入DotNet版参与讨论
相关主题
问题又来了.add web service
C#中的Memory控制觉得C#的valuetype和boxing真的是没有必要
CrystalReport 问题请教两个c# sql listview 问题
请问:关于C#和XML的问题问个sql问题
求救一个小问题What's the simplest way to do a Linq join query ?
小菜鸟求助,PDF header signature not found.Net Formatting Objects Processor - NFOP
新手请教问题SOAP
C# DateTime to Oracle Date请问, ASP.NET 中, 2 个web form之间如何传参数?
相关话题的讨论汇总
话题: datetime话题: nullable话题: objects话题: null话题: fields