need help in C#

Discussion in 'General Computer Support' started by Bonzay0, Sep 28, 2009.

  1. Bonzay0

    Bonzay0

    Joined:
    Sep 28, 2009
    Messages:
    1
    Hi,
    I was trying to translate a program from VB to C# and well
    the program I used to translate it didn't do it well.
    so I went and fixed all the codes I could, then when no error
    showed up I tried running the program but got stuck because of this line:

    Code:
    if (System.Math.Floor((double)i / 2) == i / 2)
                        {
                            b = Convert.ToChar(tmpVar.Substring(i, 1));
                            c = (long)b;
                            genVal = genVal - c;
                        }
    it says:
    Index and length must refer to a location within the string
    parameter name: length

    any way to fix it so it will work?
    if other info needed I would be happy to provide it.

    Thank you in advance.
    Last edited: Sep 28, 2009
    Bonzay0, Sep 28, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob
    Replies:
    4
    Views:
    379
    Jacky
    Feb 4, 2004
  2. nuorigin@gmail.com

    HELP - need a cam that doesn't need software install

    nuorigin@gmail.com, Nov 23, 2005, in forum: Digital Photography
    Replies:
    27
    Views:
    555
    Michael Meissner
    Nov 29, 2005
  3. hedayatniac@gmail.com

    re_---need help Network Adapters!!!! NEED HELP!!!!

    hedayatniac@gmail.com, Aug 12, 2006, in forum: Computer Support
    Replies:
    4
    Views:
    608
    hedayatniac@gmail.com
    Aug 13, 2006
  4. Piper
    Replies:
    4
    Views:
    393
    Leythos
    Jan 1, 2007
  5. sinu
    Replies:
    3
    Views:
    456
    and3w
    Jan 19, 2007
Loading...

Share This Page