why can't I inherit from StringBuilder?

  • Thread starter Thread starter Chris LaJoie
  • Start date Start date
C

Chris LaJoie

As far as I can tell, there's no logical reason for making this class
sealed. Anyone know why MS decided to do it this way?

Chris
 
Typically when they do this it has to do with behind the scenes
optimizations...I can't say this is it for sure, but it does tend to be the
case in many instances.
 
Chris LaJoie said:
As far as I can tell, there's no logical reason for making this class
sealed. Anyone know why MS decided to do it this way?

For one thing it means the framework is able to do clever optimisations
internally which it might not be able to do if you were to supply your
own StringBuilder derivation. Just a guess though.
 
Back
Top