我有2個表,一個是Employees,另一個是Departments。一個部門可以有多個/不同的員工,但一個員工只能在一個部門工作。他們的關係是一對多的。 表創造: CREATE TABLE IF NOT EXISTS department(
id INT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT
假設我有一個接口IA,其中包含一個名爲Foo的泛型方法。 public interface IA {
int Foo<T>(T otherType);
}
我想噸至是同一類型的派生類: class A : IA {
int Foo(A otherType)
{
}
}
我嘗試以下(語法錯誤): public interface IA {