Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
QuestionI am geting an error about callbackOnCollectedDelegate Pin
mahua225-Jul-13 2:11
mahua225-Jul-13 2:11 
AnswerRe: I am geting an error about callbackOnCollectedDelegate Pin
Ron Beyer5-Jul-13 3:40
professionalRon Beyer5-Jul-13 3:40 
AnswerRe: I am geting an error about callbackOnCollectedDelegate Pin
Alan N5-Jul-13 3:48
Alan N5-Jul-13 3:48 
GeneralRe: I am geting an error about callbackOnCollectedDelegate Pin
Ron Beyer5-Jul-13 4:44
professionalRon Beyer5-Jul-13 4:44 
QuestionDifference between {list}.First() and {list}[0] Pin
velvet75-Jul-13 0:59
velvet75-Jul-13 0:59 
AnswerRe: Difference between {list}.First() and {list}[0] Pin
Marco Bertschi5-Jul-13 1:18
protectorMarco Bertschi5-Jul-13 1:18 
AnswerRe: Difference between {list}.First() and {list}[0] Pin
Nicholas Marty5-Jul-13 1:24
professionalNicholas Marty5-Jul-13 1:24 
AnswerRe: Difference between {list}.First() and {list}[0] Pin
Pete O'Hanlon5-Jul-13 3:19
mvePete O'Hanlon5-Jul-13 3:19 
Directly accessing the element is faster, if there are elements in the list. However, what about if there are no elements? What happens then? Of course, both cases would result in an exception, which is where the oddity comes into play that is, at this point it's probably faster to call FirstOrDefault if the list can be null. Of course, where things get interesting is the fact that list[0] might contain a value, but it might not be the one that you're interested in, because First is designed to work as a Linq expression, so it can return you the item that is at a certain location based on the results of your Linq query.
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

AnswerRe: Difference between {list}.First() and {list}[0] Pin
Abhinav S6-Jul-13 1:41
Abhinav S6-Jul-13 1:41 
Questionunable to insert data Pin
new to c# programming4-Jul-13 21:49
new to c# programming4-Jul-13 21:49 
AnswerRe: unable to insert data Pin
Pete O'Hanlon4-Jul-13 21:58
mvePete O'Hanlon4-Jul-13 21:58 
GeneralRe: unable to insert data Pin
new to c# programming4-Jul-13 22:48
new to c# programming4-Jul-13 22:48 
AnswerRe: unable to insert data Pin
Simon_Whale4-Jul-13 22:02
Simon_Whale4-Jul-13 22:02 
GeneralRe: unable to insert data Pin
new to c# programming4-Jul-13 22:49
new to c# programming4-Jul-13 22:49 
QuestionC# shuffle one column out of two Pin
yandroide4-Jul-13 10:14
yandroide4-Jul-13 10:14 
AnswerRe: C# shuffle one column out of two Pin
Eddy Vluggen4-Jul-13 10:21
professionalEddy Vluggen4-Jul-13 10:21 
AnswerRe: C# shuffle one column out of two Pin
thanh_bkhn4-Jul-13 19:03
professionalthanh_bkhn4-Jul-13 19:03 
QuestionSplit string in multiple strings Pin
Sachin k Rajput 4-Jul-13 1:46
Sachin k Rajput 4-Jul-13 1:46 
AnswerRe: Split string in multiple strings PinPopular
Richard Deeming4-Jul-13 2:48
mveRichard Deeming4-Jul-13 2:48 
QuestionHow to use “Client Application Services” in Windows Forms Applications even in offline / disconnected mode Pin
devenv.exe3-Jul-13 23:21
professionaldevenv.exe3-Jul-13 23:21 
AnswerRe: How to use “Client Application Services” in Windows Forms Applications even in offline / disconnected mode Pin
Eddy Vluggen4-Jul-13 0:28
professionalEddy Vluggen4-Jul-13 0:28 
GeneralRe: How to use “Client Application Services” in Windows Forms Applications even in offline / disconnected mode Pin
devenv.exe4-Jul-13 1:10
professionaldevenv.exe4-Jul-13 1:10 
GeneralRe: How to use “Client Application Services” in Windows Forms Applications even in offline / disconnected mode Pin
Eddy Vluggen4-Jul-13 2:48
professionalEddy Vluggen4-Jul-13 2:48 
Questionexecute query Pin
new to c# programming3-Jul-13 20:25
new to c# programming3-Jul-13 20:25 
AnswerRe: execute query Pin
Amol_B3-Jul-13 20:46
professionalAmol_B3-Jul-13 20:46 

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.