Results 1 to 2 of 2

Thread: [2005] Get the code for built in functions?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    [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?

  2. #2
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    710

    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.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width