Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: Text File Pin
Morgs Morgan14-Nov-09 6:36
Morgs Morgan14-Nov-09 6:36 
GeneralRe: Text File Pin
N a v a n e e t h14-Nov-09 9:11
N a v a n e e t h14-Nov-09 9:11 
GeneralRe: Text File Pin
Morgs Morgan15-Nov-09 3:59
Morgs Morgan15-Nov-09 3:59 
GeneralRe: Text File Pin
PIEBALDconsult15-Nov-09 4:09
mvePIEBALDconsult15-Nov-09 4:09 
GeneralRe: Text File Pin
N a v a n e e t h15-Nov-09 14:42
N a v a n e e t h15-Nov-09 14:42 
GeneralRe: Text File Pin
Morgs Morgan20-Nov-09 6:05
Morgs Morgan20-Nov-09 6:05 
AnswerRe: Text File Pin
Xelalem14-Nov-09 6:49
Xelalem14-Nov-09 6:49 
AnswerRe: Text File Pin
Gerry Schmitz14-Nov-09 7:48
mveGerry Schmitz14-Nov-09 7:48 
XML is ideal, but you're already half way there.

Use a "delimited" file format (for starters), with the first row containing "headings" and the other rows "data", and each field separated by a "special" character (in this case "|"). This is a very common method used by various applications / databases to import / export data.

Since you already know how to read a line using StreamReader, use the string.Split() method to then split these lines on the "|" character to get an array of column names and subsequent data values in the corresponding columns.

(Your data in delimited format)
First Name|Last Name|Age|Gender|Student No.|Mobile
Morgan|Simwaba|21|Male|MB6709|074-372-****

etc
AnswerRe: Text File Pin
Abhishek Sur14-Nov-09 8:23
professionalAbhishek Sur14-Nov-09 8:23 
AnswerRe: Text File Pin
PIEBALDconsult14-Nov-09 8:48
mvePIEBALDconsult14-Nov-09 8:48 
AnswerRe: Text File Pin
hosseinghazanfary14-Nov-09 20:02
hosseinghazanfary14-Nov-09 20:02 
GeneralRe: Text File Pin
Morgs Morgan15-Nov-09 4:17
Morgs Morgan15-Nov-09 4:17 
Questionclass vs structs in C# Pin
BobInNJ14-Nov-09 5:01
BobInNJ14-Nov-09 5:01 
AnswerRe: class vs structs in C# Pin
Shameel14-Nov-09 5:07
professionalShameel14-Nov-09 5:07 
GeneralRe: class vs structs in C# Pin
N a v a n e e t h14-Nov-09 6:49
N a v a n e e t h14-Nov-09 6:49 
GeneralRe: class vs structs in C# Pin
Shameel14-Nov-09 6:57
professionalShameel14-Nov-09 6:57 
AnswerRe: class vs structs in C# Pin
N a v a n e e t h14-Nov-09 6:43
N a v a n e e t h14-Nov-09 6:43 
GeneralRe: class vs structs in C# Pin
BobInNJ14-Nov-09 12:33
BobInNJ14-Nov-09 12:33 
GeneralRe: class vs structs in C# Pin
N a v a n e e t h14-Nov-09 17:32
N a v a n e e t h14-Nov-09 17:32 
AnswerRe: class vs structs in C# Pin
Richard MacCutchan14-Nov-09 6:55
mveRichard MacCutchan14-Nov-09 6:55 
AnswerRe: class vs structs in C# Pin
PIEBALDconsult14-Nov-09 8:52
mvePIEBALDconsult14-Nov-09 8:52 
GeneralRe: class vs structs in C# Pin
BobInNJ14-Nov-09 11:44
BobInNJ14-Nov-09 11:44 
GeneralRe: class vs structs in C# Pin
PIEBALDconsult15-Nov-09 3:51
mvePIEBALDconsult15-Nov-09 3:51 
Questionfind IP-Adress of external hardware (XPort) connected via Ethernet Pin
A_Wolf14-Nov-09 4:30
A_Wolf14-Nov-09 4:30 
AnswerRe: find IP-Adress of external hardware (XPort) connected via Ethernet Pin
Dave Kreskowiak14-Nov-09 11:13
mveDave Kreskowiak14-Nov-09 11:13 

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.