Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
GeneralRe: Event syntax Pin
Member 7681714-Aug-03 4:16
Member 7681714-Aug-03 4:16 
GeneralRe: Event syntax Pin
devvvy14-Aug-03 4:59
devvvy14-Aug-03 4:59 
GeneralRe: Event syntax Pin
Member 7681714-Aug-03 5:29
Member 7681714-Aug-03 5:29 
GeneralRe: Event syntax Pin
Nick Parker14-Aug-03 7:47
protectorNick Parker14-Aug-03 7:47 
GeneralRe: Event syntax Pin
Member 7681714-Aug-03 8:00
Member 7681714-Aug-03 8:00 
GeneralRe: Event syntax Pin
devvvy15-Aug-03 20:05
devvvy15-Aug-03 20:05 
GeneralQuestion about SqlClientPermission - SecurityException Pin
yboc13-Aug-03 20:06
yboc13-Aug-03 20:06 
GeneralRe: Question about SqlClientPermission - SecurityException Pin
TigerNinja_29-Aug-03 20:23
TigerNinja_29-Aug-03 20:23 
GeneralRe: Question about SqlClientPermission - SecurityException Pin
Anonymous16-Sep-03 15:50
Anonymous16-Sep-03 15:50 
GeneralWindows Tab Loopong Question C# Pin
mamaflynny13-Aug-03 19:58
mamaflynny13-Aug-03 19:58 
GeneralRe: Windows Tab Loopong Question C# Pin
Frank Olorin Rizzi14-Aug-03 6:18
Frank Olorin Rizzi14-Aug-03 6:18 
GeneralXML parsing Pin
devvvy13-Aug-03 18:17
devvvy13-Aug-03 18:17 
GeneralRe: XML parsing Pin
Manster14-Aug-03 5:26
Manster14-Aug-03 5:26 
GeneralRe: XML parsing Pin
devvvy14-Aug-03 5:28
devvvy14-Aug-03 5:28 
GeneralC++ #Define equivalent in C# Pin
Scottk (TKS)13-Aug-03 17:42
Scottk (TKS)13-Aug-03 17:42 
GeneralRe: C++ #Define equivalent in C# Pin
Arjan Einbu13-Aug-03 21:30
Arjan Einbu13-Aug-03 21:30 
GeneralRe: C++ #Define equivalent in C# Pin
Ista14-Aug-03 4:12
Ista14-Aug-03 4:12 
GeneralWorking with Multiple Winforms ComboBox Drop Down Lists C# Pin
mamaflynny13-Aug-03 17:23
mamaflynny13-Aug-03 17:23 
GeneralRe: Working with Multiple Winforms ComboBox Drop Down Lists C# Pin
Ista14-Aug-03 6:49
Ista14-Aug-03 6:49 
Questiona better way? Pin
Member 50926213-Aug-03 17:07
Member 50926213-Aug-03 17:07 
i'm trying to use the streamreader in csharp to read a .ged file (ascii text). i got it to work but i want to know if there is anything i can do to make it better, ie. programming format, speed, style, etc.

thanks,
Rob

<-----------START----------->
public string[] GetIndex()
{
//
if (fstream == null)
{
MessageBox.Show("Error opening file stream.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
return null;
}

StreamReader fstreamCopy = fstream;
string textLine;
int index;
bool foundName = false;
ArrayList tmpIndex = new ArrayList();

while (fstreamCopy.BaseStream != null)
{
foundName = false;
try
{
textLine = fstreamCopy.ReadLine().Trim();
index = textLine.IndexOf("INDI");

if (index != -1)
{
while (!foundName)
{
textLine = fstreamCopy.ReadLine().Trim();
index = textLine.IndexOf("NAME");
if (index != -1)
{
tmpIndex.Add(textLine.Substring(index + 4).Trim());
foundName = true;
}
}
}
}
catch
{
fstreamCopy.Close();
}
}

string[] indIndex = new String[tmpIndex.Count];
for (int i = 0; i < tmpIndex.Count; i++)
{
indIndex[i] = tmpIndex[i].ToString();
}
return (indIndex);
//
}
<------------END------------>

There are 10 kinds of people. Those who understand binary and those who don't.
AnswerRe: a better way? Pin
Burt Harris16-Aug-03 17:15
Burt Harris16-Aug-03 17:15 
GeneralRe: a better way? Pin
Member 50926216-Aug-03 22:59
Member 50926216-Aug-03 22:59 
GeneralRe: a better way? Pin
Burt Harris31-Aug-03 11:02
Burt Harris31-Aug-03 11:02 
GeneralCoding Styles for Properties Pin
Alvaro Mendez13-Aug-03 16:08
Alvaro Mendez13-Aug-03 16:08 
GeneralRe: Coding Styles for Properties Pin
Nick Seng13-Aug-03 16:40
Nick Seng13-Aug-03 16:40 

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.