I've got a small bit of code I need to convert to C#. However my experience with C# is very very limited and a simple python program like the one I'm trying to convert is beyond my experience in C#. If anyone knows of any converters or is willing to help me out I would greatly appreciate it!
import random
size=5
board= [ ["_","_","_","_","_"],
["_","_","_","_","_"],
["_","_","_","_","_"],
["_","_","_","_","_"],
["_","_","_","_","_"] ]
def printBoard():
for row in board:
for square in row:
print square,
print
print
def place(marker):
placed = False
while not placed:
random_row = random.randrange(len(board))
random_col = random.randrange(len(board))
if(board[random_row][random_col]== "_"):
board[random_row][random_col] = marker
placed = True
def setBoard():
place("*")
b_count=0
while b_count<6:
place("X")
b_count=b_count+1
game_on = True
setBoard()
while game_on == True:
printBoard()
row = 0
while row < 5:
col=0
while col < 5:
if board[row][col]==("*"):
r=row
c=col
row=5
col=5
else:
col=col+1
row=row+1
print
move=(raw_input("Choose your next move (l,r,u,d): "))
if move == ("l"):
if (c-1!=-1) and (board[r][c-1]!= ("X")):
board[r][c]=("X")
c=c-1
board[r][c]=("*")
if move == ("r"):
if (c+1!=5) and (board[r][c+1]!= ("X")):
board[r][c]=("X")
c=c+1
board[r][c]=("*")
if move == ("u"):
if (r-1!=-1) and (board[r-1][c]!= ("X")):
board[r][c]=("X")
r=r-1
board[r][c]=("*")
if move == ("d"):
if (r+1!=5) and (board[r+1][c]!= ("X")):
board[r][c]=("X")
r=r+1
board[r][c]=("*")
if board[4][4] == "*":
printBoard()
game_on = False
print("Congratulations you won!")
elif board[4][4] == "X":
game_on = False
print("Sorry, there is no way to win. Please press Enter to restart.")
print
raw_input("Press Enter to exit")