Click here to Skip to main content
15,912,977 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading the data values in textfile Pin
harold aptroot22-Mar-09 7:41
harold aptroot22-Mar-09 7:41 
GeneralRe: reading the data values in textfile Pin
Nettai22-Mar-09 7:50
Nettai22-Mar-09 7:50 
GeneralRe: reading the data values in textfile [modified] Pin
harold aptroot22-Mar-09 8:27
harold aptroot22-Mar-09 8:27 
AnswerRe: reading the data values in textfile Pin
Jacob Dixon22-Mar-09 8:38
Jacob Dixon22-Mar-09 8:38 
GeneralRe: reading the data values in textfile Pin
Nettai22-Mar-09 8:51
Nettai22-Mar-09 8:51 
AnswerRe: reading the data values in textfile Pin
riced22-Mar-09 8:46
riced22-Mar-09 8:46 
AnswerRe: reading the data values in textfile Pin
Alan N22-Mar-09 9:11
Alan N22-Mar-09 9:11 
AnswerRe: reading the data values in textfile Pin
DaveyM6922-Mar-09 9:16
professionalDaveyM6922-Mar-09 9:16 
A general method for file copying, based on what you have, would look something like this:
bool FileCopy(string path1, string path2)
{
    try
    {
        using (FileStream readFileStream = new FileStream(path1, FileMode.Open, FileAccess.Read))
        {
            using (StreamReader streamReader = new StreamReader(readFileStream))
            {
                using (FileStream writeFileStream = new FileStream(path2, FileMode.Create, FileAccess.Write))
                {
                    using (StreamWriter streamWriter = new StreamWriter(writeFileStream))
                    {
                        string line;
                        while ((line = streamReader.ReadLine()) != null)
                        {
                            streamWriter.WriteLine(line);
                        }
                    }
                }
            }
        }
        return true;
    }
    catch
    {
        return false;
    }
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

QuestionRead all occurances of a specific tag out of an HTML file Pin
YiXiang_8922-Mar-09 4:49
YiXiang_8922-Mar-09 4:49 
AnswerRe: Read all occurances of a specific tag out of an HTML file Pin
N a v a n e e t h22-Mar-09 5:11
N a v a n e e t h22-Mar-09 5:11 
GeneralRe: Read all occurances of a specific tag out of an HTML file Pin
YiXiang_8922-Mar-09 5:27
YiXiang_8922-Mar-09 5:27 
GeneralRe: Read all occurances of a specific tag out of an HTML file Pin
N a v a n e e t h22-Mar-09 5:28
N a v a n e e t h22-Mar-09 5:28 
GeneralRe: Read all occurances of a specific tag out of an HTML file Pin
YiXiang_8922-Mar-09 5:39
YiXiang_8922-Mar-09 5:39 
GeneralRe: Read all occurances of a specific tag out of an HTML file Pin
0x3c022-Mar-09 6:05
0x3c022-Mar-09 6:05 
Questionwindows service, login - on-event application ;) Pin
orescik22-Mar-09 4:25
orescik22-Mar-09 4:25 
AnswerRe: windows service, login - on-event application ;) Pin
PIEBALDconsult22-Mar-09 4:39
mvePIEBALDconsult22-Mar-09 4:39 
GeneralRe: windows service, login - on-event application ;) Pin
orescik22-Mar-09 4:43
orescik22-Mar-09 4:43 
GeneralRe: windows service, login - on-event application ;) Pin
PIEBALDconsult22-Mar-09 15:23
mvePIEBALDconsult22-Mar-09 15:23 
AnswerRe: windows service, login - on-event application ;) Pin
0x3c022-Mar-09 4:45
0x3c022-Mar-09 4:45 
AnswerRe: windows service, login - on-event application ;) Pin
Yusuf22-Mar-09 5:06
Yusuf22-Mar-09 5:06 
Questionpartition cloning Pin
LordZoster22-Mar-09 4:13
LordZoster22-Mar-09 4:13 
AnswerRe: partition cloning Pin
Yusuf22-Mar-09 5:08
Yusuf22-Mar-09 5:08 
GeneralRe: partition cloning Pin
LordZoster22-Mar-09 5:18
LordZoster22-Mar-09 5:18 
QuestionJava -> C# Programming Problem , plz help ! Pin
wgarnett22-Mar-09 3:00
wgarnett22-Mar-09 3:00 
AnswerRe: Java -> C# Programming Problem , plz help ! Pin
SeMartens22-Mar-09 3:32
SeMartens22-Mar-09 3:32 

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.