I got a code in vb.net for preparing user privileges, I want to convert to c#.
this is my code.
Public Shared Function GetMenueRights(ByVal mUsername As String, ByVal mTitle As String) As Boolean
Dim myConnection As SqlConnection = New SqlConnection(GetConnectionString)
Dim myCommand As SqlCommand
Dim myReader As SqlDataReader
myCommand = New SqlCommand("SELECT mr_user FROM MenuRights WHERE mr_user ='" & mUsername & "' AND mr_menutitle ='" & mTitle & "'", myConnection)
myReader = myCommand.ExecuteReader
If myReader.HasRows = True Then
GetMenueRights = True
GetMenueRights = False
Please help me.