TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dc
NA
663
0
C# linq nullable object
Oct 10 2012 11:30 PM
In a C# 2008 application, I am using linq to sql to connect to a sql server 2008 r2 database. One of the linq statements returns the value to a datetime field called startdate.
My first if test looks like
if (startdate != null).
When there is nothing returned from the linq query and the code is on the statement,
(startdate != null), the program then lands on the catch statement of a try catch block.
Thus can you tell me what I can do so the the application does not land on the catch block code with an exception. I would think there is a way to obtain the datetime value when nothing is returned.
Can you show me what code solves the problem and explain how it solves the problem?
Reply
Answers (
5
)
Could you help me to embed C#WPF to VB.NET?
combobox multiselection