PLEASE HELP !! I don't know what is going on, this piece of my stupid code does not work. Please help me because I am a newbie to c# and I am just trying to do some code to practice. I wrote an "If statement" and normally it should work with: {}, but it doesn't. And there are other several problems, here is the output above the code :
main.cs(14,30): error CS1525: Unexpected symbol `{'
main.cs(17,6): error CS1525: Unexpected symbol `else'
main.cs(23,246): error CS1525: Unexpected symbol `end-of-file'
Compilation failed: 3 error(s), 0 warnings
compiler exit status 1
// this is the code
using System;
public class LOOOOOL {
public static void Main(String [] args)
{
int enterInfo;
int question1;
{
Console.WriteLine("LOOOOOL");
enterInfo = Console.ReadLine();
Console.WriteLine(enterInfo);
question1 = Console.WriteLine("Is that what you wrote ???");
if(String.Contains("y") {
Console.WriteLine("So that's cool, right ???");
}
else
{
Console.WriteLine("Can you re-write it please ???");
question1 = Console.ReadLine();
Console.WriteLine(question1);
}
}
Aucun commentaire:
Enregistrer un commentaire