|
-
Jan 7th, 2007, 10:43 AM
#1
Thread Starter
Frenzied Member
[2005] Get the code for built in functions?
Well I'm moving into C#.net and I was wondering how do you get the code for built in functions? Like instr and Xor those are both vb exclusive so I want to get the code for them to convert to C#. Where do you find the code for them?
-
Jan 7th, 2007, 11:11 AM
#2
Re: [2005] Get the code for built in functions?
The direct equivalent of XOr is ^ in C#.
The indirect equivalent of InStr is the .NET method IndexOf.
XOr, AndAlso, OrElse, CType, CInt, etc. are not functions but part of the VB language. Some have direct equivalents and some have indirect equivalents. Check out the VB to C# converters for help with this (including ours: Instant C#).
You could also use Reflector to see the exact IL generated by VB code, but that will not necessarily lead to the obvious C# equivalent.
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
|