Link to home
Start Free TrialLog in
Avatar of Mark01
Mark01Flag for United States of America

asked on

C# Argument Error

I am trying to work with a simple C# method argument but I get parenthesis and semicolon expected errors.
Code:
private void OpenFile(ByVal AFileName As String)

Open in new window

I am trying to convert the following VB.Net sub into a C# method:
Public Sub OpenFile(ByVal AFileName As String)
        Dim psi As New ProcessStartInfo()
        psi.UseShellExecute = True
        psi.FileName = AFileName
        Process.Start(psi)
    End Sub

Open in new window

Please help resolve the argument error.
This is not homework for a class. It is self-study using books.
ASKER CERTIFIED SOLUTION
Avatar of Bill
Bill

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark01

ASKER

Thank you, Bill.