I have the need to convert the attached code to Debian Wheezy
3.2.60-1+deb7u3.
I am attempting to compile with mono version 2.10.8.1 but I get the
following error:-
 error CS0234: The type or namespace name `Drawing' does not exist in the
namespace `System'. Are you missing an assembly reference?
csharp-client-socket.cs(3,14): error CS0234: The type or namespace name
`Windows' does not exist in the namespace `System'. Are you missing an
assembly reference?

Please tell me how I fix this.

-- 
Regards,
Alf Stockton        www.stockton.co.za
using System;
using System.Drawing; 
using System.Windows.Forms;
using System.Net.Sockets;
using System.Text; 

namespace WindowsApplication1
{
    public partial class Form1 : Form

    {

        System.Net.Sockets.TcpClient clientSocket = new System.Net.Sockets.TcpClient();



        public Form1()

        {

            InitializeComponent();

        }



        private void Form1_Load(object sender, EventArgs e)

        {

            msg("Client Started");

            clientSocket.Connect("192.168.0.9", 39513);

            label1.Text = "Client Socket Program - Server Connected ...";

        }



        private void button1_Click(object sender, EventArgs e)

        {

            NetworkStream serverStream = clientSocket.GetStream();

            byte[] outStream = System.Text.Encoding.ASCII.GetBytes(textBox2.Text + "$");

            serverStream.Write(outStream, 0, outStream.Length);

            serverStream.Flush();



            byte[] inStream = new byte[10025];

            serverStream.Read(inStream, 0, (int)clientSocket.ReceiveBufferSize);

            string returndata = System.Text.Encoding.ASCII.GetString(inStream);

            msg(returndata);

            textBox2.Text = "";

            textBox2.Focus();

        }



        public void msg(string mesg)

        {

            textBox1.Text = textBox1.Text + Environment.NewLine + " >> " + mesg;

        } 

    }

}
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to