Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface IDBBase {
- DataTable getDataTableSql(DataTable curTable,IDbCommand cmd);
- ...
- }
- class DBBase : IDBBase {
- public DataTable getDataTableSql(DataTable curTable, SqlCommand cmd) {
- ...
- }
- }
- class DBBase : IDBBase {
- DataTable IDBBase.getDataTableSql(DataTable curTable, IDbCommand cmd) {
- return getDataTableSql(curTable, (SqlCommand)cmd); // of course you should do some type checks
- }
- public DataTable getDataTableSql(DataTable curTable, SqlCommand cmd) {
- ...
- }
- }
- interface IDBClass<T> where T:IDbCommand
- {
- void Test(T cmd);
- }
- class DBClass:IDBClass<SqlCommand>
- {
- public void Test(SqlCommand cmd)
- {
- }
- }
- interface Interface1 { }
- class Class1 : Interface1 {}
- interface Interface2 { void Foo(Interface1 i1);}
- class Class2 : Interface2 {void Foo(Class1 c1) {}}
- interface Interface2 { void Foo(Interface1 i1);}
- class Class2 {void Foo(Class1 c1) {}}
- interface Interface2 { void Foo(Interface1 i1);}
- class Class2:Interface2 {void Foo(Class1 c1) {}}
- genClass"<"typeOj">"
- {
- typeOj instOj;
- public genClass(typeOj o)
- { instOj=o ; }
- public typeOj getType()
- { return instOj; }
- interface IDBBase
- {
- DataTable getDataTableSql(DataTable curTable,genClass<idcommand> cmd);
- ...
- }
- class DBBase : IDBBase
- {
- public DataTable getDataTableSql(DataTable curTable, genClass<SqlCommand> cmd)
- {
- ...
- }
- }
Add Comment
Please, Sign In to add comment