Results 1 to 10 of 10

Thread: [2.0] String & Char Conversion [RESOLVED]

Threaded View

  1. #1

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

    Question [2.0] String & Char Conversion [RESOLVED]

    ok their are 2 lines of code i'm working with that i'm trying to figure out here,i'm using Microsoft.VisualBasic; &Microsoft.VisualBasic.Compatability in the C#....

    VB Code:
    1. B = Strings.InStr(1, A[0], ControlChars.NullChar);
    2.  
    3. B = Strings.InStr(1, A[1], ControlChars.NullChar);

    Those are the 2 Strings i'm getting errors with i will post the Errors after this Section of Code,So you can see the Entire Block that those lines Go into::


    VB Code:
    1. public bool GetStrings(ref string ClientID, ref string ClientPass, ref string Seed, ref string Str1, ref string Str2, ref int mode)
    2.         {
    3.             bool getStringsReturn = false;
    4.             string[] A = new string[0];
    5.             int B;
    6.             try
    7.             {
    8.                 A[0] = new string(ControlChars.NullChar, 100);
    9.                 A[1] = new string(ControlChars.NullChar, 100);
    10.                 getStringsReturn = SM90A_Encoded_Encrypt(ClientID, ClientPass, Seed, A[0], A[1], ref mode);
    11.                 B = Strings.InStr(1, A[0], ControlChars.NullChar);
    12.                 Str1 = Strings.Left(A[0], B - 1);
    13.                 B = Strings.InStr(1, A[1], ControlChars.NullChar);
    14.                 Str2 = Strings.Left(A[1], B - 1);
    15.                 return getStringsReturn;
    16.             }
    17.             catch
    18.             {
    19.                 goto err_Renamed;
    20.             }
    21.             err_Renamed:
    22.             getStringsReturn = false;
    23.             return getStringsReturn;
    24.         }

    Here are the Errors for the 2 Lines of Code at the Top:

    Error 1 The best overloaded method match for 'Microsoft.VisualBasic.Strings.InStr(string, string, Microsoft.VisualBasic.CompareMethod)' has some invalid arguments


    Thxs in Advance Rattlerr
    Last edited by Rattlerr; Aug 8th, 2006 at 09:04 PM.

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