General note:
Don't inherit, use composition instead
class MyComponent
{
private SqlConnection connection;
....
public void Open()
{
connection.Open();
}
public ConnectionState State
{
get {return connection.State;}
set {connection.State = value;}
}
//and so on
}
"Lebesgue" <no****@spam.jp> wrote in message
news:u9*************@TK2MSFTNGP12.phx.gbl...
What can you do? You can learn the language before trying to code
IDbConnection is an interface
http://www.google.com/search?hl=en&l...%23+interfaces
Happy learning
"Carlos" <a@mapola.com> wrote in message
news:O4**************@TK2MSFTNGP09.phx.gbl... I would like to create a component that inherits from sqlconnection, but
it is sealed. What ancestor can I inherit from?
I've seen this:
public sealed class SqlConnection : Component, IDbConnection,
ICloneable
So, I've tried:
public class MyConnection : Component, System.Data.IDbConnection,
ICloneable
But I obtain a lot of errors saying:
'MyConnection.MyConnection' does not implement interface member
'System.Data.IDbConnection.xxxxxxxxxxxxxx()'
What can I do?