Answer the question
In order to leave comments, you need to log in
How to fix error in c# CS0017 code?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
int x = 10;
Console.WriteLine(x);
Console.ReadKey();
}
}
}
Answer the question
In order to leave comments, you need to log in
You have an extra static void Main() somewhere - I don't believe that's all the code you have in your project.
Find and delete.
PS: Why do you need a header from using System.Windows.* if it is not used?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question