© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
32 replies
UKPL

✅ "Build failed. Fix the compilation errors and try again."

So I started C# just a week ago and I've been struggling with a weird error message whenever I do
dotnet run
dotnet run
in the console. Everything was going just fine as soon as I add the
int[] correctAnswers = {2, 2, 1};
int[] correctAnswers = {2, 2, 1};
to the code. Even after I removed it, the error is still the same... I do have .NET version 8.0 and every needed extension installed so I don't really understand why it's popping out. I've been trying to seek the answer on YouTube or via ChatGPT but they both failed. I'd love some help.
The code:
using System;
class Program {
    static void Main(string[] args) {
        Console.WriteLine("e");

        string[] pytania = {
            "1. Ile nóg ma pająk?",
            "2. Która planeta jest najbliżej Słońca?",
            "3. Stolica Polski to?"
        };

        string[,] odpowiedzi = {
            {"1. Sześć", "2. Osiem", "3. Cztery"},
            {"1. Wenus", "2. Merkury", "3. Mars"},
            {"1. Warszawa", "2. Wrocław", "3. Gdańsk"}
        };

        int[] correctAnswers = {2, 2, 1};
    }
}
using System;
class Program {
    static void Main(string[] args) {
        Console.WriteLine("e");

        string[] pytania = {
            "1. Ile nóg ma pająk?",
            "2. Która planeta jest najbliżej Słońca?",
            "3. Stolica Polski to?"
        };

        string[,] odpowiedzi = {
            {"1. Sześć", "2. Osiem", "3. Cztery"},
            {"1. Wenus", "2. Merkury", "3. Mars"},
            {"1. Warszawa", "2. Wrocław", "3. Gdańsk"}
        };

        int[] correctAnswers = {2, 2, 1};
    }
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ It errors this when i try to build
C#CC# / help
3y ago
fix errors
C#CC# / help
3y ago
Failed build
C#CC# / help
10mo ago
Gradle build failed.
C#CC# / help
2y ago