Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As25-Jun-07 20:45
Mir_As25-Jun-07 20:45 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar26-Jun-07 1:30
Vikram A Punathambekar26-Jun-07 1:30 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As26-Jun-07 2:07
Mir_As26-Jun-07 2:07 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Vikram A Punathambekar26-Jun-07 4:31
Vikram A Punathambekar26-Jun-07 4:31 
GeneralRe: latch "0" and save next values to array in serialport?? Pin
Mir_As26-Jun-07 5:26
Mir_As26-Jun-07 5:26 
QuestionPick up a file Pin
Hum Dum25-Jun-07 19:26
Hum Dum25-Jun-07 19:26 
AnswerRe: Pick up a file Pin
Manas Bhardwaj25-Jun-07 20:05
professionalManas Bhardwaj25-Jun-07 20:05 
AnswerRe: Pick up a file Pin
I.explore.code25-Jun-07 20:30
I.explore.code25-Jun-07 20:30 
Hi humdumof, C#.NET provides a namespace System.IO which can be used for handling files and a class StreamReader and StreamWriter which can be used to read from or write to a file. As shown below
<br />
string path = @"D:\file.txt";<br />
<br />
if (File.Exists(path))<br />
            {<br />
                using (StreamReader sr = new StreamReader(path))<br />
                {<br />
                    textBox1.Text = sr.ReadToEnd();<br />
                    sr.Close();<br />
                }<br />
                using (StreamWriter sw = new StreamWriter(@"D:\newfile.txt"))<br />
                {<br />
                    sw.WriteLine(textBox1.Text);<br />
                    sw.Close();<br />
                }<br />
            }<br />
            else<br />
            {<br />
                MessageBox.Show("File does not exist.");<br />
            }<br />


This code first checks for the existence of the file and if present, it reads the content to a textbox and then copies/send the same data to other destination file, else, reads an error message. Hope it helps you.
QuestionAdding property to a control Pin
anujose25-Jun-07 18:53
anujose25-Jun-07 18:53 
AnswerRe: Adding property to a control Pin
originSH25-Jun-07 22:11
originSH25-Jun-07 22:11 
Questionhow to check the valid username and password from database? Pin
help as an alias25-Jun-07 18:22
help as an alias25-Jun-07 18:22 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 19:05
professionalManas Bhardwaj25-Jun-07 19:05 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 19:06
professionalManas Bhardwaj25-Jun-07 19:06 
QuestionRe: how to check the valid username and password from database? Pin
Vikram A Punathambekar25-Jun-07 19:53
Vikram A Punathambekar25-Jun-07 19:53 
AnswerRe: how to check the valid username and password from database? Pin
Manas Bhardwaj25-Jun-07 20:24
professionalManas Bhardwaj25-Jun-07 20:24 
GeneralRe: how to check the valid username and password from database? Pin
Brady Kelly25-Jun-07 21:06
Brady Kelly25-Jun-07 21:06 
GeneralRe: how to check the valid username and password from database? Pin
Vasudevan Deepak Kumar25-Jun-07 21:50
Vasudevan Deepak Kumar25-Jun-07 21:50 
GeneralRe: how to check the valid username and password from database? Pin
help as an alias25-Jun-07 21:00
help as an alias25-Jun-07 21:00 
QuestionUsing Delegates To Communicate Pin
DavidNelson25-Jun-07 17:58
DavidNelson25-Jun-07 17:58 
AnswerRe: Using Delegates To Communicate Pin
Leslie Sanford25-Jun-07 18:47
Leslie Sanford25-Jun-07 18:47 
AnswerRe: Using Delegates To Communicate Pin
mav.northwind25-Jun-07 18:47
mav.northwind25-Jun-07 18:47 
Question.ReadInt32() is different to java's .readInt()? Pin
kripzz25-Jun-07 16:47
kripzz25-Jun-07 16:47 
AnswerRe: .ReadInt32() is different to java's .readInt()? Pin
Paul Conrad25-Jun-07 17:02
professionalPaul Conrad25-Jun-07 17:02 
GeneralRe: .ReadInt32() is different to java's .readInt()? [modified] Pin
kripzz25-Jun-07 18:10
kripzz25-Jun-07 18:10 
AnswerRe: .ReadInt32() is different to java's .readInt()? Pin
Guffa25-Jun-07 18:40
Guffa25-Jun-07 18: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.