FW-Mike
05-23-2005, 11:43 AM
Let me preface this by saying that I am a C# newbie.
I am trying to parse a config file to display the values in input boxes using some sort of a loop for effeciency.
while ((line = sr.ReadLine()) != null)
{
cfg = line.Split('=', '2');
switch (cfg[0])
{
case "path":
this.cfgPath = cfg[1];
break;
And so on. It compiles error free, but the input boxes display nothing. If I change the code to
while ((line = sr.ReadLine()) != null)
{
cfg = line.Split('=', '2');
switch (cfg[0])
{
case "path":
this.cfgPath = cfg[0];
break;
It will display the key that I am trying to sort by -- but I want the value:
The config file lays out like this:
path=
J:\QB\Komp's.QBW
user=
1
passwd=
2
Whats the deal here? How do I get that value.
Also, as a side note, how do I select the actual name of a radio button rather than the name of its group (which is what this.Name does)
I am trying to parse a config file to display the values in input boxes using some sort of a loop for effeciency.
while ((line = sr.ReadLine()) != null)
{
cfg = line.Split('=', '2');
switch (cfg[0])
{
case "path":
this.cfgPath = cfg[1];
break;
And so on. It compiles error free, but the input boxes display nothing. If I change the code to
while ((line = sr.ReadLine()) != null)
{
cfg = line.Split('=', '2');
switch (cfg[0])
{
case "path":
this.cfgPath = cfg[0];
break;
It will display the key that I am trying to sort by -- but I want the value:
The config file lays out like this:
path=
J:\QB\Komp's.QBW
user=
1
passwd=
2
Whats the deal here? How do I get that value.
Also, as a side note, how do I select the actual name of a radio button rather than the name of its group (which is what this.Name does)
