Click here to Skip to main content
15,889,200 members
Home / Discussions / C#
   

C#

 
GeneralRe: Solver in C# Pin
sujithkumarsl21-May-07 0:03
sujithkumarsl21-May-07 0:03 
GeneralRe: Solver in C# Pin
Muammar©21-May-07 0:06
Muammar©21-May-07 0:06 
AnswerRe: Solver in C# Pin
Christian Graus21-May-07 0:57
protectorChristian Graus21-May-07 0:57 
GeneralRe: Solver in C# Pin
sujithkumarsl21-May-07 1:06
sujithkumarsl21-May-07 1:06 
QuestionActive Directory Pin
Jayesh Talsaniya20-May-07 22:36
Jayesh Talsaniya20-May-07 22:36 
AnswerRe: Active Directory Pin
Muammar©20-May-07 23:58
Muammar©20-May-07 23:58 
GeneralRe: Active Directory Pin
Jayesh Talsaniya21-May-07 0:43
Jayesh Talsaniya21-May-07 0:43 
Questioncross-threading problem Pin
suck12320-May-07 22:31
suck12320-May-07 22:31 
hi,
I've got this part of code
<br />
public delegate void DellagacjaVoid();<br />
<br />
        public void pingowanie()<br />
        {<br />
            if (this.InvokeRequired)<br />
            {<br />
                DellagacjaVoid delegacja = new DellagacjaVoid(pingowanie);<br />
                this.Invoke(delegacja);<br />
            }<br />
<br />
            string sciezka = "plik.txt";<br />
            if (File.Exists(sciezka))<br />
            {                               <br />
                FileStream fs = new FileStream(sciezka, FileMode.Open, FileAccess.Read);<br />
                StreamReader reader = new StreamReader(fs);<br />
                string linia = reader.ReadLine();<br />
                linia = null;<br />
                while ((linia=reader.ReadLine()) != null)<br />
                {<br />
                    try<br />
                    {                        <br />
                        richTextBox1.Text += linia + "\n";<br />
                    }<br />
                    catch (Exception ex)<br />
                    {<br />
                        MessageBox.Show(ex.Message);<br />
                    }<br />
                }<br />
                reader.Close();<br />
            }<br />
        }<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            Thread watek = new Thread(pingowanie);<br />
            watek.Start();            <br />
        }<br />


the thing is that the content i read to the richtextbox alright, as many lines as there are in the txt file but also I get as many exeptions as number of lines with the text like this:
http://img444.imageshack.us/img444/6911/88524168zy6.png[^]

can someone help?
AnswerRe: cross-threading problem Pin
Bekjong20-May-07 23:21
Bekjong20-May-07 23:21 
AnswerRe: cross-threading problem Pin
PandemoniumPasha21-May-07 0:08
PandemoniumPasha21-May-07 0:08 
QuestionHow can I write text file on web application? [modified] Pin
Junior Boy20-May-07 21:34
Junior Boy20-May-07 21:34 
AnswerRe: How can I write text file on web application? Pin
Christian Graus20-May-07 21:46
protectorChristian Graus20-May-07 21:46 
GeneralRe: How can I write text file on web application? Pin
Junior Boy20-May-07 22:36
Junior Boy20-May-07 22:36 
GeneralRe: How can I write text file on web application? Pin
Christian Graus20-May-07 23:14
protectorChristian Graus20-May-07 23:14 
QuestionStange crashes of an application Pin
J. Holzer20-May-07 21:29
J. Holzer20-May-07 21:29 
AnswerRe: Stange crashes of an application Pin
Manoj Kumar Rai20-May-07 22:36
professionalManoj Kumar Rai20-May-07 22:36 
GeneralRe: Stange crashes of an application Pin
J. Holzer20-May-07 23:27
J. Holzer20-May-07 23:27 
QuestionDownloading XML File Pin
Vineed20-May-07 21:00
Vineed20-May-07 21:00 
AnswerRe: Downloading XML File Pin
Dave Herren21-May-07 11:36
Dave Herren21-May-07 11:36 
Questionabout event question.I need help,thanks. Pin
jason_mf20-May-07 20:45
jason_mf20-May-07 20:45 
AnswerRe: about event question.I need help,thanks. Pin
Expert Coming20-May-07 20:51
Expert Coming20-May-07 20:51 
GeneralRe: about event question.I need help,thanks. Pin
jason_mf20-May-07 21:02
jason_mf20-May-07 21:02 
GeneralRe: about event question.I need help,thanks. Pin
PandemoniumPasha20-May-07 21:32
PandemoniumPasha20-May-07 21:32 
GeneralRe: about event question.I need help,thanks. Pin
jason_mf21-May-07 19:55
jason_mf21-May-07 19:55 
GeneralRe: about event question.I need help,thanks. Pin
blackjack215020-May-07 21:32
blackjack215020-May-07 21: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.