c# Programming Glossary: inheriteda
how to improve this method using polymorphism+overloading so as to reduce IS (type check)? http://stackoverflow.com/questions/9892660/how-to-improve-this-method-using-polymorphismoverloading-so-as-to-reduce-is-ty BaseClass MyBase public int Add BaseClass next if this is InheritedA next is InheritedA return 1 else if this is InheritedA next.. int Add BaseClass next if this is InheritedA next is InheritedA return 1 else if this is InheritedA next is InheritedB return.. is InheritedA next is InheritedA return 1 else if this is InheritedA next is InheritedB return 2 else if this is InheritedB next..
|