Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to IF?! Pin
Migounette9-Apr-10 12:23
Migounette9-Apr-10 12:23 
GeneralRe: how to IF?! Pin
harold aptroot9-Apr-10 12:03
harold aptroot9-Apr-10 12:03 
GeneralRe: how to IF?! Pin
Jassim Rahma9-Apr-10 12:06
Jassim Rahma9-Apr-10 12:06 
GeneralRe: how to IF?! Pin
harold aptroot9-Apr-10 12:13
harold aptroot9-Apr-10 12:13 
GeneralRe: how to IF?! Pin
Jassim Rahma9-Apr-10 12:30
Jassim Rahma9-Apr-10 12:30 
GeneralRe: how to IF?! Pin
harold aptroot9-Apr-10 12:31
harold aptroot9-Apr-10 12:31 
GeneralRe: how to IF?! Pin
Jassim Rahma9-Apr-10 12:36
Jassim Rahma9-Apr-10 12:36 
AnswerRe: how to IF?! Pin
AspDotNetDev9-Apr-10 16:18
protectorAspDotNetDev9-Apr-10 16:18 
Wow, this is probably the first time I've seen a valid use for the EXCLUSIVE OR operator:
C#
if (!(string.IsNullOrEmpty(textBox1.Text) ^ string.IsNullOrEmpty(textBox2.Text)))
{
    MessageBox.Show("Valid");
}
else
{
    MessageBox.Show("Invalid");
}


You could also do that with && and ||, but this is probably the most succint technique.

GeneralRe: how to IF?! Pin
harold aptroot10-Apr-10 1:04
harold aptroot10-Apr-10 1:04 
GeneralRe: how to IF?! Pin
Luc Pattyn10-Apr-10 1:36
sitebuilderLuc Pattyn10-Apr-10 1:36 
JokeRe: how to IF?! Pin
AspDotNetDev10-Apr-10 10:40
protectorAspDotNetDev10-Apr-10 10:40 
GeneralRe: how to IF?! Pin
Luc Pattyn10-Apr-10 11:19
sitebuilderLuc Pattyn10-Apr-10 11:19 
GeneralRe: how to IF?! Pin
AspDotNetDev10-Apr-10 11:29
protectorAspDotNetDev10-Apr-10 11:29 
GeneralRe: how to IF?! Pin
Luc Pattyn10-Apr-10 11:46
sitebuilderLuc Pattyn10-Apr-10 11:46 
GeneralRe: how to IF?! Pin
AspDotNetDev10-Apr-10 13:32
protectorAspDotNetDev10-Apr-10 13:32 
GeneralRe: how to IF?! Pin
Luc Pattyn10-Apr-10 13:51
sitebuilderLuc Pattyn10-Apr-10 13:51 
GeneralRe: how to IF?! Pin
AspDotNetDev10-Apr-10 14:34
protectorAspDotNetDev10-Apr-10 14:34 
GeneralRe: how to IF?! Pin
PIEBALDconsult19-Apr-10 13:01
mvePIEBALDconsult19-Apr-10 13:01 
AnswerRe: how to IF?! [modified] Pin
NavnathKale10-Apr-10 2:43
NavnathKale10-Apr-10 2:43 
GeneralRe: how to IF?! Pin
harold aptroot10-Apr-10 3:03
harold aptroot10-Apr-10 3:03 
GeneralRe: how to IF?! Pin
AspDotNetDev10-Apr-10 13:35
protectorAspDotNetDev10-Apr-10 13:35 
GeneralRe: how to IF?! Pin
harold aptroot10-Apr-10 13:54
harold aptroot10-Apr-10 13:54 
GeneralRe: how to IF?! Pin
AspDotNetDev10-Apr-10 14:39
protectorAspDotNetDev10-Apr-10 14:39 
GeneralRe: how to IF?! Pin
harold aptroot10-Apr-10 14:48
harold aptroot10-Apr-10 14:48 
GeneralRe: how to IF?! Pin
AspDotNetDev10-Apr-10 15:02
protectorAspDotNetDev10-Apr-10 15:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.