Click here to Skip to main content
15,892,697 members
Home / Discussions / C#
   

C#

 
GeneralRe: user name and password Pin
Mads1158-Jun-09 20:18
Mads1158-Jun-09 20:18 
GeneralRe: user name and password Pin
saanj8-Jun-09 20:25
saanj8-Jun-09 20:25 
GeneralRe: user name and password Pin
Abhijit Jana8-Jun-09 20:39
professionalAbhijit Jana8-Jun-09 20:39 
AnswerRe: user name and password Pin
saanj8-Jun-09 20:15
saanj8-Jun-09 20:15 
QuestionMulti thread, one dialog form [modified] Pin
yunusdemiray8-Jun-09 20:02
yunusdemiray8-Jun-09 20:02 
QuestionCrystal Report Problem with multiple DataTables (It is urgent) Pin
sharad Pyakurel8-Jun-09 17:15
sharad Pyakurel8-Jun-09 17:15 
QuestionError of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 15:26
brandonwong1238-Jun-09 15:26 
AnswerRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
Christian Graus8-Jun-09 15:28
protectorChristian Graus8-Jun-09 15:28 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 18:28
brandonwong1238-Jun-09 18:28 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
N a v a n e e t h8-Jun-09 18:39
N a v a n e e t h8-Jun-09 18:39 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 19:01
brandonwong1238-Jun-09 19:01 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
Christian Graus8-Jun-09 19:02
protectorChristian Graus8-Jun-09 19:02 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1238-Jun-09 19:10
brandonwong1238-Jun-09 19:10 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
Christian Graus8-Jun-09 19:17
protectorChristian Graus8-Jun-09 19:17 
GeneralRe: Error of "failed to import the activex control. please ensure it is properly registered" Pin
brandonwong1239-Jun-09 6:24
brandonwong1239-Jun-09 6:24 
QuestionGet DataGridView ComboBox Column value?? Pin
jasper0188-Jun-09 15:07
jasper0188-Jun-09 15:07 
AnswerRe: Get DataGridView ComboBox Column value?? Pin
jayveebishie23-Oct-10 4:46
jayveebishie23-Oct-10 4:46 
QuestionSet an arrays items to new strings Pin
Jasmine Pomelo8-Jun-09 14:44
Jasmine Pomelo8-Jun-09 14:44 
Humm this is a puzzler im settings from a .txt file which looks like this

//This is the directory which your downloaded files will be stored in
DownloadFolder = /mnt/md1/public/Downloads

//The telnet user usualy root
TelnetUser = root

//The telnet password
TelnetPassword = root

//The IP of your NAS eg 192.168.2.2
TelnetIP = 192.168.2.2

I want to convert these values into strings eg TelnetIP = 192.168.2.2 so they can be reused on multiple forms . So ive got them importing with a StreamReader below



private void LoadSettings()
{
StreamReader Settings = new StreamReader("Settings.txt");
string line;
while ((line = Settings.ReadLine()) != null)
{
if (line.StartsWith("/"))
{
}
else
{
string[] splitArray = line.Split(new char[] { '=' });
MessageBox.Show(splitArray[0]);

}
}

}


So in this case splitArray[0] gives DownloadFolder and splitArray[1] gives /mnt/md1/public/Downloads perfect but how do i join them back togeather to give

DownloadFolder = /mnt/md1/public/Downloads

And also im getteng blank lines coming through as settings else if (line.StartsWith("/r/n")) or \r\n dosnt seem to catch them

any ideas ? thanks
GeneralRe: Set an arrays items to new strings Pin
jasper0188-Jun-09 15:16
jasper0188-Jun-09 15:16 
GeneralRe: Set an arrays items to new strings Pin
Jasmine Pomelo8-Jun-09 15:31
Jasmine Pomelo8-Jun-09 15:31 
Question'is' operator Pin
Member 10339078-Jun-09 11:27
Member 10339078-Jun-09 11:27 
AnswerRe: 'is' operator Pin
Christian Graus8-Jun-09 11:33
protectorChristian Graus8-Jun-09 11:33 
GeneralRe: 'is' operator Pin
Member 10339078-Jun-09 11:40
Member 10339078-Jun-09 11:40 
GeneralRe: 'is' operator Pin
Christian Graus8-Jun-09 11:57
protectorChristian Graus8-Jun-09 11:57 
GeneralRe: 'is' operator Pin
Christian Graus8-Jun-09 12:05
protectorChristian Graus8-Jun-09 12:05 

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.