Click here to Skip to main content
15,890,690 members
Home / Discussions / C#
   

C#

 
GeneralRe: btn event async await rtb and tb overlap and switch between them by tb.show and tb.hide Pin
Member 1356965020-Jan-22 10:00
Member 1356965020-Jan-22 10:00 
QuestionExceptions Pin
Simon_Whale17-Jan-22 2:30
Simon_Whale17-Jan-22 2:30 
AnswerRe: Exceptions Pin
CHill6017-Jan-22 3:08
mveCHill6017-Jan-22 3:08 
GeneralRe: Exceptions Pin
Simon_Whale17-Jan-22 3:53
Simon_Whale17-Jan-22 3:53 
AnswerRe: Exceptions Pin
OriginalGriff17-Jan-22 3:41
mveOriginalGriff17-Jan-22 3:41 
GeneralRe: Exceptions Pin
Simon_Whale17-Jan-22 3:53
Simon_Whale17-Jan-22 3:53 
AnswerRe: Exceptions Pin
Luc Pattyn17-Jan-22 3:59
sitebuilderLuc Pattyn17-Jan-22 3:59 
QuestionRe: Exceptions Pin
Simon_Whale18-Jan-22 5:05
Simon_Whale18-Jan-22 5:05 
AnswerRe: Exceptions Pin
Gerry Schmitz17-Jan-22 6:07
mveGerry Schmitz17-Jan-22 6:07 
GeneralRe: Exceptions Pin
Simon_Whale18-Jan-22 5:06
Simon_Whale18-Jan-22 5:06 
AnswerRe: Exceptions Pin
lmoelleb18-Jan-22 4:55
lmoelleb18-Jan-22 4:55 
QuestionRe: Exceptions Pin
Eddy Vluggen18-Jan-22 19:32
professionalEddy Vluggen18-Jan-22 19:32 
AnswerRe: Exceptions Pin
lmoelleb18-Jan-22 20:40
lmoelleb18-Jan-22 20:40 
GeneralRe: Exceptions Pin
Eddy Vluggen19-Jan-22 0:40
professionalEddy Vluggen19-Jan-22 0:40 
GeneralRe: Exceptions Pin
lmoelleb19-Jan-22 0:48
lmoelleb19-Jan-22 0:48 
GeneralRe: Exceptions Pin
Eddy Vluggen19-Jan-22 1:12
professionalEddy Vluggen19-Jan-22 1:12 
AnswerRe: Exceptions Pin
Eddy Vluggen18-Jan-22 18:02
professionalEddy Vluggen18-Jan-22 18:02 
AnswerRe: Exceptions Pin
jschell23-Jan-22 7:32
jschell23-Jan-22 7:32 
Questionnecessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
BillWoodruff16-Jan-22 2:39
professionalBillWoodruff16-Jan-22 2:39 
GeneralRe: necessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
harold aptroot16-Jan-22 3:21
harold aptroot16-Jan-22 3:21 
GeneralRe: necessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
BillWoodruff16-Jan-22 5:14
professionalBillWoodruff16-Jan-22 5:14 
thanks, Harold, as I'd expect from you, a very thoughtful reply.

I've found very little documentation on 'TryGetNonEnumeratedCount so far. My impression in the SO thread cited is that this new Linq method is somehow more efficient.

Given .Any short-circuits when it encounters a first instance: I find myself wondering if under-the-hood .Any is in any way more "efficient" in a function that returns an IEnumerable ... compared to invoking Count().

In this context: in a loop where a series of functions are called in sequence, and the goal is to exit the loop when any function returns an empty IEnumerable ... .Any can be used while testing for null or == default are useless.

cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch

GeneralRe: necessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
harold aptroot16-Jan-22 6:56
harold aptroot16-Jan-22 6:56 
GeneralRe: necessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
BillWoodruff16-Jan-22 18:22
professionalBillWoodruff16-Jan-22 18:22 
GeneralRe: necessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
Richard Deeming16-Jan-22 22:45
mveRichard Deeming16-Jan-22 22:45 
GeneralRe: necessity to use .Any() to check if an IEnumerable<T> result has no items without iterating over it ? Pin
BillWoodruff18-Jan-22 1:19
professionalBillWoodruff18-Jan-22 1:19 

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.