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?
 
BillConnect With a Mentor Software EngineerCommented:
private void OpenfileName (string afilename)
0
 
Mark01Author Commented:
Thank you, Bill.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.