Comment rendre tout générique
J'aimerai déporter la fonction Hastable Add(Hastable) dans l'interface principal, mais j'obtiens une ambiguïté.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| public interface IBrClientActions<T> where T : class
{
T Add(T element);
void Update(T element);
}
public interface IBrClientAdresseClientActions : IBrClientActions<AdresseClient>
{
Hashtable Add(Hashtable h);
}
public interface IBrClientRoleClientActions : IBrClientActions<Role>
{
Hashtable Add(Hashtable h);
}
public class AdresseClient
{
}
public class Role
{
} |
Une idée ?