How can I convert these Java code pieces to C#?

public String getRawMaze() { StringBuilder sb = new StringBuilder(); for (int[] row : maze) { sb.append(Arrays.toString(row) + "\n"); } return sb.toString(); } How can I convert this code to C#? Maze is: private int[][] maze; >Solution : Adapt to C# naming conventions (methods start with upper letter), replace Arrays.toString by string.Join and change the syntax… Read More How can I convert these Java code pieces to C#?

How do I call a string inside a different class?

I’m trying to call a string that’s inside a different class, and am wondering how to do so. Currently my though process is just Console.WriteLine(CardData.cardType) But that’s obviously not working. Code: namespace ConsoleUno { class Program { public static class wholeTing { public static List<CardData> cardDataList = new List<CardData>(); public class CardData { public string… Read More How do I call a string inside a different class?

Problems with a C# switch statement

I am making a paper scissors rock game and am receiving the following error: Cannot implicitly convert type ‘int’ to ‘system.random’ namespace Rock__Paper__Scissors_CSNET { internal class Program { static void Main(string[] args) { Console.WriteLine("This is a Rock, Paper, Scissors game. Enter your choice below"); Console.WriteLine("1. Rock"); Console.WriteLine("2. Paper"); Console.WriteLine("3. Scissors"); string userInput = Console.ReadLine(); Random… Read More Problems with a C# switch statement