Speaking of strings...
"Jason" <firstname.lastname@example.org> wrote:
>Let me be more specific on some of these things:
>Functions for manipulating strings:
>Why are all these things functions? Because they were functions in Basic
>20 years ago! My TRS80 Model 100 supports all these functions, using the
>original version of Microsoft Basic.
>Strings are objects. Files are objects. But in VB-classic, they are data
>structures, or something that is not quite an object. Legacy.
Can anyone tell me why the .NET String class is Sealed (C# term, I don't
know what the VB.NET equivalent is)? It does not have a Left method for example,
so why not inherit from the String class and add your own Left functionality?
I'll tell you why, because it is Sealed. You cannot inherit from it. Is there
something I am missing?
p.s. - Yes, I know the String class has a SubString method, but it throws
an exception if you go out of range. The Left implementation would give you
as many characters as are available without requiring that the caller know
how many are there.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center