Results 1 to 9 of 9

Thread: string to ref string error ??[Resolved]

Threaded View

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    string to ref string error ??[Resolved]

    This is weird . Below, the method signature is marked as ByRef . I exported this class to dll file . It works fine in VB. In C# , it gives me two strange errors .They say : Argument '1': cannot convert from 'string' to 'ref string'
    and
    Argument '2': cannot convert from 'string' to 'ref string'

    VB Code:
    1. Public Shared Function FindFile(ByRef RootPath As String, ByRef FileName As String) As String

    I used it like this :

    Code:
    MessageBox.Show(FindFileViaAPI.FileClass.FindFile("c:\\" ,"setup.exe"));
    Anyone knows why ?
    Last edited by Pirate; Aug 11th, 2003 at 10:09 AM.

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