Click here to Skip to main content
15,895,256 members
Home / Discussions / C#
   

C#

 
GeneralRe: Conditional comparaison Pin
Spacix One21-Apr-08 12:23
Spacix One21-Apr-08 12:23 
Generalbeginners question Pin
NewToAspDotNet21-Apr-08 9:23
NewToAspDotNet21-Apr-08 9:23 
GeneralRe: beginners question Pin
Pete O'Hanlon21-Apr-08 9:31
mvePete O'Hanlon21-Apr-08 9:31 
Generalwrong forum Pin
Luc Pattyn21-Apr-08 10:04
sitebuilderLuc Pattyn21-Apr-08 10:04 
GeneralRe: wrong forum Pin
Pete O'Hanlon21-Apr-08 10:08
mvePete O'Hanlon21-Apr-08 10:08 
GeneralRe: wrong forum Pin
User 665821-Apr-08 10:13
User 665821-Apr-08 10:13 
GeneralRe: wrong forum Pin
Pete O'Hanlon21-Apr-08 10:25
mvePete O'Hanlon21-Apr-08 10:25 
GeneralRe: wrong forum [modified] Pin
Spacix One21-Apr-08 10:40
Spacix One21-Apr-08 10:40 
I think it's clear as anything else, I mean this operator is in most any C-style language: C#, Java, JavaScript, PHP, Ruby, Verilog, and others..

I have seen the ternary operator abused such as the following:
public bool myMethod()
{
    bool myBool;
    //some code goes though and assigns a value to myBool
    return (myBool==true)?(true) : ((myBool==false) ? false:true);
}


Greeeg wrote:
I still didn't know about the ?? operator, thanks for that

Just so you know, unless you are interacting normal types with nullable types the ?? operator isn't worth much. It doesn't surprise me if you've never seen it before. It is one of those things that you won't know until you need it.

Edited to show I was talking to Greeeg about the ?? operator

modified on Monday, April 21, 2008 4:48 PM

GeneralRe: wrong forum Pin
Pete O'Hanlon21-Apr-08 10:45
mvePete O'Hanlon21-Apr-08 10:45 
GeneralRe: wrong forum Pin
Luc Pattyn21-Apr-08 10:34
sitebuilderLuc Pattyn21-Apr-08 10:34 
GeneralRe: wrong forum Pin
Pete O'Hanlon21-Apr-08 10:42
mvePete O'Hanlon21-Apr-08 10:42 
GeneralRe: wrong forum Pin
Luc Pattyn21-Apr-08 11:07
sitebuilderLuc Pattyn21-Apr-08 11:07 
GeneralRe: wrong forum Pin
Spacix One21-Apr-08 11:09
Spacix One21-Apr-08 11:09 
GeneralRe: wrong forum Pin
Luc Pattyn21-Apr-08 12:06
sitebuilderLuc Pattyn21-Apr-08 12:06 
GeneralRe: wrong forum Pin
Spacix One21-Apr-08 12:14
Spacix One21-Apr-08 12:14 
GeneralRe: wrong forum Pin
Pete O'Hanlon21-Apr-08 11:15
mvePete O'Hanlon21-Apr-08 11:15 
Generalsome contanimation Pin
Luc Pattyn21-Apr-08 12:02
sitebuilderLuc Pattyn21-Apr-08 12:02 
GeneralRe: beginners question Pin
carbon_golem21-Apr-08 9:32
carbon_golem21-Apr-08 9:32 
GeneralRe: beginners question Pin
Pete O'Hanlon21-Apr-08 9:34
mvePete O'Hanlon21-Apr-08 9:34 
GeneralRe: beginners question Pin
carbon_golem21-Apr-08 9:43
carbon_golem21-Apr-08 9:43 
GeneralRe: beginners question Pin
Spacix One21-Apr-08 9:50
Spacix One21-Apr-08 9:50 
GeneralRe: beginners question Pin
Guffa21-Apr-08 21:25
Guffa21-Apr-08 21:25 
Generalcut string if it is to long for a field Pin
stephan_00721-Apr-08 9:15
stephan_00721-Apr-08 9:15 
GeneralRe: cut string if it is to long for a field Pin
damianrda21-Apr-08 9:23
damianrda21-Apr-08 9:23 
GeneralRe: cut string if it is to long for a field Pin
Spacix One21-Apr-08 9:41
Spacix One21-Apr-08 9:41 

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.