Click here to Skip to main content
15,879,535 members
Home / Discussions / C#
   

C#

 
AnswerRe: update progress bar concurrently in windows form Pin
monstale16-Jul-09 2:11
monstale16-Jul-09 2:11 
AnswerRe: update progress bar concurrently in windows form Pin
MumbleB16-Jul-09 2:19
MumbleB16-Jul-09 2:19 
QuestionIf statement with ? and : characters Pin
soso_online16-Jul-09 1:00
soso_online16-Jul-09 1:00 
AnswerRe: If statement with ? and : characters Pin
Tamer Oz16-Jul-09 1:13
Tamer Oz16-Jul-09 1:13 
GeneralRe: If statement with ? and : characters Pin
soso_online16-Jul-09 2:09
soso_online16-Jul-09 2:09 
AnswerRe: If statement with ? and : characters Pin
Luc Pattyn16-Jul-09 1:25
sitebuilderLuc Pattyn16-Jul-09 1:25 
GeneralRe: If statement with ? and : characters Pin
soso_online16-Jul-09 2:09
soso_online16-Jul-09 2:09 
AnswerRe: If statement with ? and : characters Pin
Pete O'Hanlon16-Jul-09 1:54
mvePete O'Hanlon16-Jul-09 1:54 
The technical name for this is the ternary operator (sometimes known as the conditional operator) if you ever need to look it up. Did you know that there are other cool operators available in C#? My favourite is the null coalescing operator or ??. This works by chaining items together until a none-null condition is reached. For instance:
string value = GetValueFromDatabase() ?? GetValueFromConfigFile() ?? "None Selected";
In this example, if a null is returned from GetValueFromDatabase, the code will attempt to assign a value from GetValueFromConfigFile and if this returns null, None Selected is used (as it's the first none-null operator).

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: If statement with ? and : characters Pin
soso_online16-Jul-09 2:08
soso_online16-Jul-09 2:08 
QuestionWindows Form Datagridview Pin
Rajeshwar Code- Developer16-Jul-09 0:58
Rajeshwar Code- Developer16-Jul-09 0:58 
AnswerRe: Windows Form Datagridview Pin
Vimalsoft(Pty) Ltd16-Jul-09 1:14
professionalVimalsoft(Pty) Ltd16-Jul-09 1:14 
GeneralRe: Windows Form Datagridview Pin
Rajeshwar Code- Developer16-Jul-09 1:19
Rajeshwar Code- Developer16-Jul-09 1:19 
GeneralRe: Windows Form Datagridview Pin
Vimalsoft(Pty) Ltd16-Jul-09 1:21
professionalVimalsoft(Pty) Ltd16-Jul-09 1:21 
GeneralRe: Windows Form Datagridview Pin
Rajeshwar Code- Developer16-Jul-09 1:36
Rajeshwar Code- Developer16-Jul-09 1:36 
GeneralRe: Windows Form Datagridview Pin
Vimalsoft(Pty) Ltd16-Jul-09 2:02
professionalVimalsoft(Pty) Ltd16-Jul-09 2:02 
GeneralRe: Windows Form Datagridview Pin
K030616-Jul-09 1:24
K030616-Jul-09 1:24 
QuestionHorizontal scroll bar on the UserControl Panel not working... Pin
spalanivel16-Jul-09 0:57
spalanivel16-Jul-09 0:57 
QuestionCell click coordinates Pin
Chazzysb16-Jul-09 0:46
Chazzysb16-Jul-09 0:46 
AnswerRe: Cell click coordinates Pin
Chazzysb16-Jul-09 1:04
Chazzysb16-Jul-09 1:04 
QuestionErase a windows event log Pin
Md. Marufuzzaman16-Jul-09 0:15
professionalMd. Marufuzzaman16-Jul-09 0:15 
AnswerRe: Erase a windows event log Pin
Pete O'Hanlon16-Jul-09 0:28
mvePete O'Hanlon16-Jul-09 0:28 
GeneralRe: Erase a windows event log Pin
Luc Pattyn16-Jul-09 1:27
sitebuilderLuc Pattyn16-Jul-09 1:27 
Questionsorting problem in outlook Pin
john563216-Jul-09 0:11
john563216-Jul-09 0:11 
QuestionC# How to HttpWebRequest through chain/cascade of proxy servers Pin
lermi15-Jul-09 23:55
lermi15-Jul-09 23:55 
Questionhow to drag and drop values from one datagrid to another datagrid? Pin
swetha_insoft15-Jul-09 23:41
swetha_insoft15-Jul-09 23: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.