Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to C# from VB...

Status
Not open for further replies.

stnkyminky

Programmer
Oct 15, 2001
476
US
I'm sure some of you will say that I've seen the light, but I'm planning on moving to C# from VB.Net. Given that C# compilers are being created to run .Net on non-Windows OS's has led me to this decision.

I've been programming in .Net for 1 year. I've become familiar enough with the framework that I feel the jump will not be much of a culture shock. However, I have a few questions. I've done some C# coding, nothing in production, and have found that some function in VB don't exist in C#. For example, MID(), INSTR(), INSTRREV().

Although I can import the microsoft.visualbasic.dll, I would rather not and stay pure C#. If anyone else has had experience moving to C#, I would enjoy your feedback as to what is different and how you over came those problems.

*Note: I understand the language syntax difference, but not the "internal" functions.

Thanks



Scott
Programmer Analyst
<{{><
 
Hi Scott!

Yes, the sooner you can get away from the VB compatibility library the better. By using pure framework calls your code will be more portable (as such) between the two languages.

I really haven't missed too many of the VB string handling functions, as the String class has replacements, or at least gives you a way to get equivalent functionality.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
The particular functions you mentioned are methods of the String class... specifically, the Substring, IndexOf, and LastIndexOf methods.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top