c# - Why does Hashtable implement both ICollection and IEnumerable? -


this question has answer here:

in .net framework 3.5 (c# 3.0) why system.hashtable implement both icollection , ienumerable when implements idictionary inherits these 2 interfaces?

having these intefaces:

interface ifoo1 {...}  interface ifoo2: ifoo1{...} 

there no difference in terms of compilation between followings:

class myclass: ifoo2{...}  class myclass: ifoo2, ifoo1{...} 

the second declaration makes clearer developers interfaces myclass class implements. easier have @ documentation , see myclass implements ifoo1 interface, without digging ifoo2 interface.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -