Click here to Skip to main content
15,885,998 members
Home / Discussions / C#
   

C#

 
GeneralRe: WaitAny coincident event signalling Pin
paul_b_baker17-Feb-10 21:55
paul_b_baker17-Feb-10 21:55 
GeneralRe: WaitAny coincident event signalling Pin
#realJSOP18-Feb-10 0:15
mve#realJSOP18-Feb-10 0:15 
GeneralRe: WaitAny coincident event signalling Pin
Nicholas Butler18-Feb-10 1:48
sitebuilderNicholas Butler18-Feb-10 1:48 
QuestionFind blank element in Array Pin
Sunil G17-Feb-10 3:21
Sunil G17-Feb-10 3:21 
AnswerRe: Find blank element in Array Pin
Keith Barrow17-Feb-10 3:28
professionalKeith Barrow17-Feb-10 3:28 
GeneralRe: Find blank element in Array Pin
Sunil G17-Feb-10 3:33
Sunil G17-Feb-10 3:33 
GeneralRe: Find blank element in Array Pin
Keith Barrow17-Feb-10 3:55
professionalKeith Barrow17-Feb-10 3:55 
AnswerRe: Find blank element in Array Pin
harold aptroot17-Feb-10 3:35
harold aptroot17-Feb-10 3:35 
"Blank" in what way? Array's don't have "blanks" in them, although an array of type T may contain elements with the value default(T) - is that what you want to find?
If so, you might do this: (!!untested!!)

static int CountEmpty<T>(IEnumerable<T> data)
{
    return data.Count((T item) => object.Equals(item, default(T)));
}


Someone will have to iterate the array though, even if you don't do it yourself. Without looking at the whole array you can never know that there are no "blanks" left in the part that you skipped.
Except of course if you keep a count of how many elements of the array you changed from blank to non-blank (minus the ones you changed back to "blank") in the first place.
GeneralRe: Find blank element in Array Pin
Rob Philpott17-Feb-10 6:01
Rob Philpott17-Feb-10 6:01 
AnswerRe: Find blank element in Array Pin
PIEBALDconsult17-Feb-10 8:11
mvePIEBALDconsult17-Feb-10 8:11 
GeneralRe: Find blank element in Array Pin
Anurag Gandhi17-Feb-10 17:53
professionalAnurag Gandhi17-Feb-10 17:53 
QuestionWindows Forms, ComboBoxes. Pin
Nexusfactor17-Feb-10 3:11
Nexusfactor17-Feb-10 3:11 
AnswerRe: Windows Forms, ComboBoxes. Pin
Dave Kreskowiak17-Feb-10 3:40
mveDave Kreskowiak17-Feb-10 3:40 
QuestionSMTP Client - amount of bytes send out of attached files. Pin
fracalifa17-Feb-10 2:53
fracalifa17-Feb-10 2:53 
AnswerRe: SMTP Client - amount of bytes send out of attached files. Pin
Dave Kreskowiak17-Feb-10 3:29
mveDave Kreskowiak17-Feb-10 3:29 
GeneralRe: SMTP Client - amount of bytes send out of attached files. Pin
fracalifa17-Feb-10 3:45
fracalifa17-Feb-10 3:45 
GeneralRe: SMTP Client - amount of bytes send out of attached files. Pin
Rozis17-Feb-10 10:15
Rozis17-Feb-10 10:15 
AnswerRe: SMTP Client - amount of bytes send out of attached files. Pin
Ennis Ray Lynch, Jr.17-Feb-10 10:29
Ennis Ray Lynch, Jr.17-Feb-10 10:29 
Questioncontrol mouse and keyboard of remote machine. Pin
Tridip Bhattacharjee17-Feb-10 2:01
professionalTridip Bhattacharjee17-Feb-10 2:01 
AnswerRe: control mouse and keyboard of remote machine. Pin
sanforjackass17-Feb-10 2:15
sanforjackass17-Feb-10 2:15 
GeneralRe: control mouse and keyboard of remote machine. Pin
Tridip Bhattacharjee17-Feb-10 18:57
professionalTridip Bhattacharjee17-Feb-10 18:57 
GeneralRe: control mouse and keyboard of remote machine. Pin
sanforjackass17-Feb-10 20:40
sanforjackass17-Feb-10 20:40 
AnswerRe: control mouse and keyboard of remote machine. Pin
Dave Kreskowiak17-Feb-10 3:20
mveDave Kreskowiak17-Feb-10 3:20 
AnswerRe: control mouse and keyboard of remote machine. Pin
sksaininet25-Dec-10 20:02
sksaininet25-Dec-10 20:02 
Questionnet use [modified] Pin
arsendem17-Feb-10 1:31
arsendem17-Feb-10 1:31 

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.