Re: Unable to append string in VB
From: Dennis (Dennis_at_discussions.microsoft.com)
Date: 09/04/04
- Next message: Siv: "Re: Closing MDI Child Form Won't Reopen? Help!"
- Previous message: Engineerik: "Prevent edits in one datagrid column"
- In reply to: Herfried K. Wagner [MVP]: "Re: Unable to append string in VB"
- Next in thread: Herfried K. Wagner [MVP]: "Re: Unable to append string in VB"
- Reply: Herfried K. Wagner [MVP]: "Re: Unable to append string in VB"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 4 Sep 2004 14:39:01 -0700
The primary reason that I was trying to stick to the classes rather than
revert to Visual Basic Language was the possibility that Microsoft will, in
some future relese of VB.Net, eliminate the older Visual Basic functions such
as Left, Right, and Mid. Hey, thank for your info and opinion on this topic.
"Herfried K. Wagner [MVP]" wrote:
> * =?Utf-8?B?RGVubmlz?= <Dennis@discussions.microsoft.com> scripsit:
> > You mentioned String.Left in your reply. I know that you can use code like a
> > = left(b,10) to get the 10 left most characters. However, the String class
> > member in the MSDN doesn't list a left or right method or property. Is
> > something like a = b.left(10) legal?
>
> No, it's not. You will have to use 'Substring' if you want to use a
> method of your string object.
>
> > I am trying to avoid the old Left and right inherent in Visual Basic
> > and stick to the string class but I't cumbersome sometimes because using
>
> Newer is not necessarily better.
>
> > Left(a,10) where a is only "" gives a "" result in visual basic but
> > the string class a.substring(0,10) gives an error when a="".
>
> ACK. That's indeed very annoying. That's why I keep using the
> functions provided in the 'Strings' module.
>
> > By the way, I very much enjoy reading your replies to the news
> > group and have learned a lot from your replies to others as well as myself.
> > Thanks a lot.
>
> :-)
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>
- Next message: Siv: "Re: Closing MDI Child Form Won't Reopen? Help!"
- Previous message: Engineerik: "Prevent edits in one datagrid column"
- In reply to: Herfried K. Wagner [MVP]: "Re: Unable to append string in VB"
- Next in thread: Herfried K. Wagner [MVP]: "Re: Unable to append string in VB"
- Reply: Herfried K. Wagner [MVP]: "Re: Unable to append string in VB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|