Click here to Skip to main content
15,923,120 members
Home / Discussions / C#
   

C#

 
AnswerRe: i m getting an error while using array, please help me Pin
markovl4-Jul-12 2:16
markovl4-Jul-12 2:16 
AnswerRe: i m getting an error while using array, please help me Pin
Pete O'Hanlon4-Jul-12 2:16
mvePete O'Hanlon4-Jul-12 2:16 
GeneralRe: i m getting an error while using array, please help me Pin
markovl4-Jul-12 2:21
markovl4-Jul-12 2:21 
GeneralRe: i m getting an error while using array, please help me Pin
Pete O'Hanlon4-Jul-12 2:32
mvePete O'Hanlon4-Jul-12 2:32 
AnswerRe: i m getting an error while using array, please help me Pin
Luc Pattyn4-Jul-12 11:36
sitebuilderLuc Pattyn4-Jul-12 11:36 
GeneralProblem with Writing FileStream Pin
Software20074-Jul-12 0:01
Software20074-Jul-12 0:01 
GeneralRe: Problem with Writing FileStream Pin
Richard MacCutchan4-Jul-12 0:21
mveRichard MacCutchan4-Jul-12 0:21 
GeneralRe: Problem with Writing FileStream Pin
Pete O'Hanlon4-Jul-12 0:29
mvePete O'Hanlon4-Jul-12 0:29 
GeneralRe: Problem with Writing FileStream Pin
Richard MacCutchan4-Jul-12 3:47
mveRichard MacCutchan4-Jul-12 3:47 
GeneralRe: Problem with Writing FileStream Pin
Pete O'Hanlon4-Jul-12 4:05
mvePete O'Hanlon4-Jul-12 4:05 
GeneralRe: Problem with Writing FileStream Pin
Richard MacCutchan4-Jul-12 4:20
mveRichard MacCutchan4-Jul-12 4:20 
GeneralRe: Problem with Writing FileStream Pin
Pete O'Hanlon4-Jul-12 4:40
mvePete O'Hanlon4-Jul-12 4:40 
GeneralRe: Problem with Writing FileStream Pin
Luc Pattyn4-Jul-12 1:33
sitebuilderLuc Pattyn4-Jul-12 1:33 
GeneralRe: Problem with Writing FileStream Pin
Software20074-Jul-12 7:16
Software20074-Jul-12 7:16 
GeneralRe: Problem with Writing FileStream Pin
Trak4Net4-Jul-12 7:47
Trak4Net4-Jul-12 7:47 
GeneralRe: Problem with Writing FileStream Pin
Luc Pattyn4-Jul-12 8:02
sitebuilderLuc Pattyn4-Jul-12 8:02 
GeneralRe: Problem with Writing FileStream Pin
Software20074-Jul-12 11:07
Software20074-Jul-12 11:07 
GeneralRe: Problem with Writing FileStream Pin
Trak4Net4-Jul-12 11:29
Trak4Net4-Jul-12 11:29 
GeneralRe: Problem with Writing FileStream Pin
Software20074-Jul-12 11:46
Software20074-Jul-12 11:46 
QuestionC# code obtain and compares Pin
sc steinhayse3-Jul-12 15:13
sc steinhayse3-Jul-12 15:13 
AnswerRe: C# code obtain and compares Pin
RobCroll3-Jul-12 17:18
RobCroll3-Jul-12 17:18 
AnswerRe: C# code obtain and compares Pin
Abhinav S3-Jul-12 17:24
Abhinav S3-Jul-12 17:24 
AnswerRe: C# code obtain and compares Pin
Pete O'Hanlon3-Jul-12 22:17
mvePete O'Hanlon3-Jul-12 22:17 
QuestionMulti-Dimensional Array's? Pin
premier-gamer3-Jul-12 13:47
premier-gamer3-Jul-12 13:47 
GeneralRe: Multi-Dimensional Array's? Pin
RobCroll3-Jul-12 14:15
RobCroll3-Jul-12 14:15 
====================================================
int[,] array = new int[24, 3]; //any number
for(int i=0; i<24; i++)
{
array[i][0] = binaryReader.readBytes(4);
array[i][1] = binaryReader.readInt32();
array[i][2] = binaryReader.readStringTerminatedNull();
}
====================================================

Note how array is initialised int [,] and [24, 3]
Note how element is referenced 0, 1, 2 not name, age and input
Also int[] can only contain integer values, not strings.

Personally I hate multi-dimensional arrays. I almost always encapsulate them as collections of classes so array[i][0] becomes person.name
"You get that on the big jobs."

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.