Error 1 Invalid token '=' in class, struct, or interface member declaration - C#
Формулировка задачи:
Листинг программы
- {
- class Person
- {
- public string firstName;
- public string lastName;
- public void ShowFullName()
- {
- Console.WriteLine("Name is" + firstName + " " + lastName);
- }
- Person Petr;
- Petr = new Person();
- Petr.firstName = "Petr";
- Petr.lastName = "Ivanov";
- Petr.ShowFullName();
- }
- }
Решение задачи: «Error 1 Invalid token '=' in class, struct, or interface member declaration»
textual
Листинг программы
- class Program
- {
- static void Main()
- {
- Console.WriteLine(new Program());
- Console.ReadKey();
- }
- }
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д