Results 1 to 4 of 4

Thread: VB Conversion [RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member Rattlerr's Avatar
    Join Date
    Jul 2005
    Location
    FloralCity,Florida
    Posts
    269

    Resolved VB Conversion [RESOLVED]

    Here is the couple lines of code i'm working on Converting into C#..I'v referenced the CStr but cant find any Methods for it in C# that i notice..

    VB Code:
    1. ClientList.Items.Add(CStr(x))
    2. Label4.Text = CStr(CDbl(Label4.Text) + 1)
    ' looking to convert the CStr,CDbl...I know the Dbl = Double & Str = String but converting is what i need help with..

    Thxs in Advanced for the help..
    Last edited by Rattlerr; Jan 31st, 2006 at 12:19 PM.

  2. #2
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: VB Conversion

    I think C#.Net is able to do this:

    VB Code:
    1. ClientList.Items.Add(Convert.ToString(x))
    2.         Label4.Text = Convert.ToString(Convert.ToDouble(Label4.Text) + 1)
    Might need a tweak or two, but it's all the same Fx

  3. #3

    Thread Starter
    Hyperactive Member Rattlerr's Avatar
    Join Date
    Jul 2005
    Location
    FloralCity,Florida
    Posts
    269

    Re: VB Conversion

    Thxs for the help appreciate it..

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

    Re: VB Conversion [RESOLVED]

    The Convert methods are indeed the closest replacement for the VB conversion macros. Add the semi-colons and you're done
    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