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

C#

 
Questionhow to count elements inside an array? Pin
donkaiser18-May-06 4:44
donkaiser18-May-06 4:44 
AnswerRe: how to count elements inside an array? Pin
Robert Rohde18-May-06 4:50
Robert Rohde18-May-06 4:50 
AnswerRe: how to count elements inside an array? Pin
NaNg1524118-May-06 4:53
NaNg1524118-May-06 4:53 
GeneralRe: how to count elements inside an array? Pin
J4amieC18-May-06 5:39
J4amieC18-May-06 5:39 
GeneralRe: how to count elements inside an array? Pin
Robert Rohde18-May-06 5:57
Robert Rohde18-May-06 5:57 
GeneralRe: how to count elements inside an array? Pin
NaNg1524118-May-06 7:24
NaNg1524118-May-06 7:24 
GeneralRe: how to count elements inside an array? Pin
Robert Rohde18-May-06 7:27
Robert Rohde18-May-06 7:27 
GeneralRe: how to count elements inside an array? Pin
pq4noeh19-May-06 1:53
pq4noeh19-May-06 1:53 
why instead don't you try
won't it work???
public int NumUsed(object[] arr)
{
int Ctr = 0;
for (int i = 0; i < arr.GetLength(0); i++)
{
if( arr[i]!=null)
Ctr++;
}
return Ctr;
}

and when you set one array position to unused do it like

arr[i] = null

of course you would have to use an object array but you could cast the object to byte when you
the real value

i think it will do


NOthing by now;)
GeneralRe: how to count elements inside an array? Pin
Robert Rohde19-May-06 4:32
Robert Rohde19-May-06 4:32 
AnswerRe: how to count elements inside an array? Pin
Rei Miyasaka18-May-06 7:10
Rei Miyasaka18-May-06 7:10 
AnswerRe: how to count elements inside an array? Pin
Guffa18-May-06 9:48
Guffa18-May-06 9:48 
AnswerRe: how to count elements inside an array? Pin
donkaiser18-May-06 10:35
donkaiser18-May-06 10:35 
QuestionDo not start application from byte[] Pin
Dima Filipiuk18-May-06 4:40
Dima Filipiuk18-May-06 4:40 
AnswerRe: Do not start application from byte[] Pin
leppie18-May-06 5:24
leppie18-May-06 5:24 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 7:43
Dima Filipiuk18-May-06 7:43 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 10:00
Rei Miyasaka18-May-06 10:00 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 11:01
Dima Filipiuk18-May-06 11:01 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 11:31
Rei Miyasaka18-May-06 11:31 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 20:28
Dima Filipiuk18-May-06 20:28 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 20:32
Rei Miyasaka18-May-06 20:32 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk18-May-06 22:49
Dima Filipiuk18-May-06 22:49 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka18-May-06 23:12
Rei Miyasaka18-May-06 23:12 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk19-May-06 0:27
Dima Filipiuk19-May-06 0:27 
GeneralRe: Do not start application from byte[] Pin
Rei Miyasaka19-May-06 0:34
Rei Miyasaka19-May-06 0:34 
GeneralRe: Do not start application from byte[] Pin
Dima Filipiuk19-May-06 1:03
Dima Filipiuk19-May-06 1:03 

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.