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.
Mark01Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BillConnect With a Mentor Software EngineerCommented:
private void OpenfileName (string afilename)
0
 
Mark01Author Commented:
Thank you, Bill.
0
All Courses

From novice to tech pro — start learning today.