Click here to Skip to main content
16,015,827 members
Home / Discussions / C#
   

C#

 
GeneralRe: questions about an array? Pin
Keith Barrow18-Sep-09 4:38
professionalKeith Barrow18-Sep-09 4:38 
GeneralRe: questions about an array? Pin
JollyMansArt18-Sep-09 4:44
JollyMansArt18-Sep-09 4:44 
GeneralRe: questions about an array? Pin
harold aptroot18-Sep-09 4:46
harold aptroot18-Sep-09 4:46 
GeneralRe: questions about an array? Pin
Keith Barrow18-Sep-09 4:53
professionalKeith Barrow18-Sep-09 4:53 
GeneralRe: questions about an array? Pin
harold aptroot18-Sep-09 4:57
harold aptroot18-Sep-09 4:57 
GeneralRe: questions about an array? Pin
Richard MacCutchan18-Sep-09 5:03
mveRichard MacCutchan18-Sep-09 5:03 
GeneralRe: questions about an array? Pin
harold aptroot18-Sep-09 5:05
harold aptroot18-Sep-09 5:05 
GeneralRe: questions about an array? Pin
Keith Barrow18-Sep-09 5:15
professionalKeith Barrow18-Sep-09 5:15 
Like the Second:

int a = 0;
int b = 0;
int c = 0;
int d = 0;

int x = true ? ++a : ++b;
Console.WriteLine("a={0}, b={1}", a, b);
int y = false? ++c : ++d;
Console.WriteLine("c={0}, d={1}", c, d);


outputs:

1, 0
0, 1

Meaning that the "false" value of the ternary operator never gets evaluated (infact VS highlights it as unreachable).
GeneralRe: questions about an array? Pin
harold aptroot18-Sep-09 5:26
harold aptroot18-Sep-09 5:26 
GeneralTerinary commands then what is wrong with this example? As I am learning to use them... Pin
JollyMansArt18-Sep-09 5:41
JollyMansArt18-Sep-09 5:41 
GeneralRe: Terinary commands then what is wrong with this example? As I am learning to use them... Pin
harold aptroot18-Sep-09 5:47
harold aptroot18-Sep-09 5:47 
GeneralRe: Terinary commands then what is wrong with this example? As I am learning to use them... Pin
JollyMansArt18-Sep-09 5:55
JollyMansArt18-Sep-09 5:55 
GeneralRe: Terinary commands then what is wrong with this example? As I am learning to use them... Pin
JollyMansArt18-Sep-09 6:11
JollyMansArt18-Sep-09 6:11 
GeneralRe: Terinary commands then what is wrong with this example? As I am learning to use them... Pin
JollyMansArt18-Sep-09 5:52
JollyMansArt18-Sep-09 5:52 
GeneralRe: questions about an array? Pin
Keith Barrow18-Sep-09 6:24
professionalKeith Barrow18-Sep-09 6:24 
GeneralRe: questions about an array? Pin
Richard MacCutchan18-Sep-09 5:02
mveRichard MacCutchan18-Sep-09 5:02 
GeneralRe: questions about an array? Pin
JollyMansArt18-Sep-09 4:42
JollyMansArt18-Sep-09 4:42 
GeneralRe: questions about an array? Pin
harold aptroot18-Sep-09 4:49
harold aptroot18-Sep-09 4:49 
JokeRe: questions about an array? Pin
JollyMansArt18-Sep-09 4:53
JollyMansArt18-Sep-09 4:53 
AnswerRe: questions about an array? Pin
JollyMansArt18-Sep-09 4:29
JollyMansArt18-Sep-09 4:29 
AnswerRe: questions about an array? [modified] Pin
Keith Barrow18-Sep-09 4:32
professionalKeith Barrow18-Sep-09 4:32 
JokeRe: questions about an array? Pin
JollyMansArt18-Sep-09 4:50
JollyMansArt18-Sep-09 4:50 
GeneralRe: questions about an array? Pin
Keith Barrow18-Sep-09 4:59
professionalKeith Barrow18-Sep-09 4:59 
AnswerRe: questions about an array? Pin
dan!sh 18-Sep-09 4:37
professional dan!sh 18-Sep-09 4:37 
GeneralRe: questions about an array? Pin
JollyMansArt18-Sep-09 4:51
JollyMansArt18-Sep-09 4:51 

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.