Hello, I got a error 'Does not implement interface member'
I search around the net and try a lots of solutions, both did not works for me.
How can I fix this problem ?
'Browser.CoreServer' does not implement interface member 'browser.iDataConnection.tcpclient'
...

namespace Browser
{

    public interface iDataConnection
    {
        TcpClient tcpclient { get; set; }
        StreamReader streamReader_connect { get; set; }
        StreamWriter streamWriter_connect { get; set; }
        NetworkStream networkStream_connect { get; set; }
    }

    public class CoreServer : iDataConnection    <-- Error at this line
    {
        iDataConnection dc = new CoreServer();
    }

    public partial class Browser : Form
    {}
}

'Browser.CoreServer' does not implement interface member

This says it all.
If you your class derives from an interface, it MUST implement ALL the interface members.

Hi,

Since you want to add properties to your interface, why don't you convert it to 'abstract class' instead?

Try using the following code :-

namespace Browser
{

    public abstract class iDataConnection
    {
        TcpClient tcpclient { get; set; }
        StreamReader streamReader_connect { get; set; }
        StreamWriter streamWriter_connect { get; set; }
        NetworkStream networkStream_connect { get; set; }
    }

    public class CoreServer : iDataConnection
    {
        iDataConnection dc = new CoreServer();
    }

    public partial class Browser : Form
    {}
}

Hope that helps :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.