The problem is that if you could inherit from string you could, in effect, change its semantics. Strings in .NET are immutable. With derivation allowed it would be possible to create strings that were not. This would cause unexpected side-effects
Regards
Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<et**************@TK2MSFTNGP10.phx.gbl>
Hi,
why is the String class sealed ?
wouldn't it be nice to have a
class MyString : String
{ ... }
containing already all the nice features of String ?
thnx
Chris
************************************************** ********************
Sent via Fuzzy Software @
http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004
[microsoft.public.dotnet.languages.csharp]