|
-
Apr 3rd, 2004, 01:16 AM
#1
Thread Starter
Fanatic Member
Right() Function
What is the replacement for VB6's Right() function in VB.Net?
-
Apr 3rd, 2004, 01:32 AM
#2
use the Substring function , eg:
VB Code:
Dim s As String = "test 123"
MessageBox.Show(s.Substring(s.Length - 3))
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Apr 3rd, 2004, 01:35 AM
#3
Thread Starter
Fanatic Member
That's fine. There are so many ways to achieve the result. But is there any built-in function in VB.Net?
I just wonder, why they removed such an useful function!!
-
Apr 3rd, 2004, 03:52 AM
#4
PowerPoster
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Apr 3rd, 2004, 04:31 AM
#5
Thread Starter
Fanatic Member
Common taxes,
Everybody knows that.
But that's an additional reference to Microsoft.VisualBasic namespace.
What if I want to avoid it?
-
Apr 3rd, 2004, 04:35 AM
#6
Sleep mode
Originally posted by pvbangera
What if I want to avoid it?
then you have to follow what sysop suggested .
-
Apr 3rd, 2004, 04:44 AM
#7
PowerPoster
"Common taxes,
Everybody knows that. "
OK. I'll assume you know everything in future. Bye
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Apr 4th, 2004, 03:32 PM
#8
Frenzied Member
The substring IS native to .net. It's the "proper" way of getting your results. you can use the right() function but i've HEARD through the grapevine that some older functions will lose portability when Whidbey comes around the mountain
-
Apr 4th, 2004, 03:56 PM
#9
well as i said use the Substring function , but whidbey hasn't lost the visual basic Right function i run whidbey and this is straight from it ...
VB Code:
Dim s As String = "test 123"
MessageBox.Show(Microsoft.VisualBasic.Right(s, 3))
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Apr 4th, 2004, 07:02 PM
#10
PowerPoster
Hi dynamic_sysop,
" MessageBox.Show(Microsoft.VisualBasic.Right(s, 3))"
So. This function already exists in VB.NET. What is all the fuss? VB.NET even allows you to use
MessageBox.Show(Right(s, 3))
in a module.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Apr 5th, 2004, 01:53 AM
#11
Thread Starter
Fanatic Member
I thinx Taxes is too sensitive. That was a very rude "Bye"
Well, I think
VB Code:
MessageBox.Show(Right(s, 3))
needs
VB Code:
Imports Microsoft.VisualBasic
statement on top of your class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|