?
Solved

Another way of coding this

Posted on 2011-10-14
5
Medium Priority
?
190 Views
Last Modified: 2012-08-14
I think there's a way to code this in one line, no?

 if (chkReferral.Checked)
            ip.IsReferral = true;
        else
            ip.IsReferral = false;
0
Comment
Question by:Camillia
  • 3
5 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 36968176
If (chkReferral.Checked) Then ip.IsReferral = true Else ip.IsReferral = false
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 36968193
ip.IsReferral = chkReferral.Checked ? true : false ;
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 36968195
ip.IsReferral = chkReferral.Checked
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 36968215
or perhaps
ip.IsReferral = chkReferral.Checked;
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 36968221
What he ^ said
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question