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# check for null in linq
Sep 29 2012 3:06 PM
For a C# 2010 application, I would like to be able to check for the value
returned by the linq to sql query listed below as being null.
Is there any way to check for
strOrgName == null?
string strOrgName = (from o in rData.Orgs
join pl in rData.Custs on o.OrgID equals pl.OrgID
where pl.orgnum == strContract
select o.OrgName).FirstOrDefault();
The code I have written so far only allows if I check for
strOrgName != null.
I am using the code above to use as an example of how I would like to be able
check for the value returned being a null.
Thus can you tell me how to solve my isuse?
Reply
Answers (
4
)
Mysql change values
Adding,Storing and retriving image from SQL SERVER 2005