Hi
I am entirely new to C# but have many years experience in Basic programming.
I was wondering if C# has an equivalent to Left$, Mid$ and Right$.
The reason I am asking is because I intend to convert a program I wrote many years ago in Spectrum Basic. I have successfully converted this programs to other forms of basic and it uses Left$, Right$ and mid$.
Any help would be appreciated
I am entirely new to C# but have many years experience in Basic programming.
I was wondering if C# has an equivalent to Left$, Mid$ and Right$.
The reason I am asking is because I intend to convert a program I wrote many years ago in Spectrum Basic. I have successfully converted this programs to other forms of basic and it uses Left$, Right$ and mid$.
Any help would be appreciated
Hi Roger,
As far as I can see, C# doesn't have the exact same functions as those found in Basic. The SubString method of the String class is probably as close as it gets, but it's not totally the same. However, you can probably find user-written alternatives, like this one: http://dev1.wordpress.com/2007/08/31/left-right-and-mid-functions-in-c/. I haven't tested them, but they seem to do what you want. Have a look and see if they can help you
As far as I can see, C# doesn't have the exact same functions as those found in Basic. The SubString method of the String class is probably as close as it gets, but it's not totally the same. However, you can probably find user-written alternatives, like this one: http://dev1.wordpress.com/2007/08/31/left-right-and-mid-functions-in-c/. I haven't tested them, but they seem to do what you want. Have a look and see if they can help you
