Here's how:
Add to your C# project a reference to the "Microsoft VisualBasic .Net
Runtime" assembly,
add this statement to the top of your code:
using Microsoft.VisualBasic;
and then just it like you would any other assembly.
as in Debug.WriteLine(Strings.Right("Test99", 2);
This dirty little secret is probably being used by more than one ex-VB
programmer who prefers to keep using the good old well-known VB6 runtime
routines instead of learning the .Net class library. Personally, I don't
recommend it; you'd be better off knuckling down and learning the class
library, but as a shortcut it's probably OK. I'll never tell.
HTH,
Tom Dacon
Dacon Software Consulting
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:eP**************@TK2MSFTNGP10.phx.gbl...
I want to use
string MyString="Test99";
Strings.Rigt(MyString,2);
to get the "22" from my string.
But I can't do that with CSharp.
Strings is belong to Microsoft.VisualBasic Namespace.
How can I use it with CSharp?