0

Ive developed a simple p2p chat program, it works fine up until i get to the input/output streams

in my void that recieves incoming text i have the following code...

public void listen()
        {
            while (true)
            {
            again:
                try
                {
                    convobox.AppendText(Input.ReadLine);
                }
                catch
                {
                    goto again;
                }
            }
        }

it says that it has some invalid arguments,
what am i doing wrong?

2
Contributors
9
Replies
10
Views
8 Years
Discussion Span
Last Post by Rashakil Fol
0

"Input" is the incoming text from the stream of the TCP connection,
what the piece of code is meant to do is read incoming text from the stream and put it in a box

0

And I would expect using Input.ReadLine to get you an error about a type mismatch, so maybe you meant Input.ReadLine().

0

becuase it reads the incoming text from the connection (Input.ReadLine()) and displays it in a textbox (convobox.Text = Input.ReadLine())

0

If Input is a method group, then you can't call a method on it. That makes no sense. You might have some serious misconceptions; maybe try answering this question a second time: What is the type of the variable or property, Input?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.