Error cs1014 a get or set accessor expected

using System; //Find the square root of a number for 10 values from user class forLoop { static void Main { double x; for(int i=10; i>0 && x>=0; i--) ...
using System;

//Find the square root of a number for 10 values from user

class forLoop
{
    static void Main
    {

        double x;

        for(int i=10; i>0 && x>=0; i--)
        {


        Console.WriteLine("You have {0} remaining calculations left", i);
        Console.Write("Please enter a positive number: ");

        x = double.Parse((Console.ReadLine());
        x = Math.Sqrt(x);

        Console.WriteLine("The square root is {0}", x);
        Console.WriteLine("");
        }

    Console.WriteLine("You have 0 remaining calculations left");

    }

}

I need help on this C# problem: Why does the error: «A get or set accessor expected» come up at compile time?

Cᴏʀʏ's user avatar

Cᴏʀʏ

104k20 gold badges165 silver badges192 bronze badges

asked Nov 3, 2014 at 1:40

tehricefarmer's user avatar

1

You missed the () in method declaration. Thus, the compiler thinks at some level that you’re declaring a Property (albeit it would then throw an error about the void type), not a Method

// Property
public int Property
{
    get { return _field; }
    set { _field = value; }
}

// Property, albeit a get-only property
public int Property => _field;

// Method
public int Method()
{
    return _field;
}

// Method
public int Method() => _field;

UPDATE: Since this is still being seen, I’ve updated the example values to better reflect their underlying types, and included examples of expression bodies introduced with C# 6

answered Nov 3, 2014 at 2:02

David's user avatar

DavidDavid

10.3k1 gold badge26 silver badges40 bronze badges

You need parentheses (()) in the method declaration.

answered Nov 3, 2014 at 1:42

SLaks's user avatar

SLaksSLaks

857k175 gold badges1886 silver badges1956 bronze badges

0

Parentheses is required to differentiate a method from a property that requires the get/set syntax

Community's user avatar

answered Feb 24, 2015 at 17:57

madhu131313's user avatar

madhu131313madhu131313

6,7917 gold badges38 silver badges52 bronze badges

  • Remove From My Forums
  • Question

  • Hi!

    I am currently working on a project but i get this error: «a get or set accessor expected».What kind of changes i should do to fix that error?
     Here’s the code:

     public static object xard 
            { 
                 if (button1.Enabled == false) 
                { 
                   Application.DoEvents(); 

                } 
                if (button1.Enabled == true) 
                { 

                   stopwatch.Stop(); 
                   LogWrite(«Time=   » + stopwatch.ElapsedMilliseconds); 
                } 
            }

    • Edited by

      Thursday, November 14, 2013 8:44 PM

Answers

  • Since the «xard» identifier is not followed by parenthesis, the compiler assumes that «xard» is a property. Properties are structured as follows:

    public static object xard
    {
        get
        {
            // "get" accessor code here
        }
        set
        {
            // "set" accessor code here
        }
    }

    Your code does not use those «get» and «set» keywords, so the compiler is raising the error.

    If «xard» is a method, then you need to add parenthesis after the identifier:

    public static object xard()
    { 
        if (button1.Enabled == false) 
        { 
            Application.DoEvents(); 
        } 
        if (button1.Enabled == true) 
        { 
            stopwatch.Stop(); 
            LogWrite("Time=   " + stopwatch.ElapsedMilliseconds); 
        } 
    }

    • Proposed as answer by
      Christopher84
      Friday, November 15, 2013 7:35 AM
    • Marked as answer by
      Waltor123
      Friday, November 15, 2013 3:11 PM

Maray

4 / 4 / 4

Регистрация: 03.01.2015

Сообщений: 449

1

16.05.2016, 20:29. Показов 2046. Ответов 3

Метки нет (Все метки)


Добрый день!

Помогите, пожалуйста исправить ошибку

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        class D
        {
           private string name;
           private string surname;
           private int age;
           private List<D> Dir;
 
            public string name
            {
                get { return Name; }
                set { Name = value; }
            }
            public string surname
            {
                get { return Surname; }
                set { Surname = value; }
            }
            public int age
            {
                get { return Age; }
                set { Age = value; }
            }
 
 
             public D(string Name, string Surname, int Age)
            {
              this.name = Name;
              this.surname = Surname;
              this.age = Age;
            }
 
 
        }
        public Form1()
        {
            InitializeComponent();
        }
 
        static void Main
        {
           Director = new D ("Александр", "Иванов", 36);  <----------(Подчеркивает Director  и выдает ошибку "A get or set accessor expected    ")
        
        }
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
          
            switch (e.Node.Name)
            { 
                case "Директор":
                {
                    textBox1.Text = Director.name;
                    textBox2.Text = Director.surname;
                    textBox3.Text = Convert.ToString(Director.age);
                    panel1.Visible = true;
                }
                break;
                case "Третий":
                {
                    panel1.Visible = false;
                }
                break;
            }
        }
    }
}

Добавлено через 5 минут
И подскажите, как сделать. Мне нужно сделать переменную Директор(имя, фамилия, возраст, список заместителей). Потом добавить в список заместителей двух заместителей(имя, фамилия, возраст)

Добавлено через 1 минуту
Работа идет с TreeView. Директор-главная запись, он раскрывается на этих двух заместителей

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Programming

Эксперт

94731 / 64177 / 26122

Регистрация: 12.04.2006

Сообщений: 116,782

16.05.2016, 20:29

Ответы с готовыми решениями:

Как исправить ошибку «Не удается преобразовать из «System.Windows.Forms.TextBox» в «bool»?
Функция:

Proxy.Set(new WebProxy(&quot;ip адрес&quot;, порт));

Хочу сделать что бы данные выводились из…

Как исправить ошибку: Неявное преобразование типа «void» в «string» невозможно?
Как исправить ошибку в label3.Text=F(2, n, 0, m, a);//начальный делитель, число, начало массива,…

Как исправить «преобразование типа из «string» в «System.Net.IPEndPoint» невозможно»?
Здравствуйте, не могу отправить массив байт, может кто-то знает как правильно записать ip.
При…

Выдает ошибку — «Не удалось привести тип объекта «TheMaze.FormLevel1» к типу «System.Windows.Forms.Label».»
Ругается вот на эту строчку: ((Label)sender).Visible = false;

Вот код:
using System;
using…

3

6187 / 2439 / 717

Регистрация: 11.04.2015

Сообщений: 3,948

Записей в блоге: 43

17.05.2016, 11:36

2

В классе D куча ошибок. Имена переменных совпадают с именами свойств, а акцессоры свойств ссылаются на необъявленные имена. C# — регистрозависимый язык, не надо об этом забывать.



1



Maray

4 / 4 / 4

Регистрация: 03.01.2015

Сообщений: 449

17.05.2016, 19:45

 [ТС]

3

Вот до этого делал программу, и все работает

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ConsoleApplication1
{
    class Account
    {
        private string Fam;
        private double NS;
        private double Proc;
        private double Summ;
 
       public string fam {
            get { return Fam; }
            set { Fam = value; }
        }
        public double ns {
            get { return NS; }
            set { NS = value; }
        }
        public double proc
        {
            get { return Proc; }
            set { Proc = value; }
        }
        public double summ {
            get { return Summ; }
            set { Summ = value; }
        }
 
        
    public Account(string Fam, double NS, double Proc, double Summ)
     {
           this.fam = Fam;
           this.ns = NS;
           this.proc = Proc;
           this.summ = Summ;
      }
 
        public double Sum
        { get
            { return Summ; }
          set
            {
              if (Summ < value)
                { Summ = Summ - value; }
                else
              throw new ArgumentOutOfRangeException();
            }
        }
 
    }
    class Prog
    {
        static List<Account> accounts;
     
        static void Ans1()
        {   string Fam;
            Console.Write("Введите фамилию владельца счета: ");
            Fam = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
                Console.WriteLine("Номер счета: "+Ter.ns);
                Console.WriteLine("Процент начисления: "+Ter.proc);
                Console.WriteLine("Сумма в рублях: "+Ter.summ);
                break;
            }
           Menu();
        }
 
        static void Ans2()
        {
           string Fam;
           string Fam1;
            Console.Write("Введите фамилию владельца, которого нужно сменить: ");
            Fam = Console.ReadLine();
            Console.Write("Введите новую фамилию владельца: ");
            Fam1 = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
                if (Ter.fam==Fam)
                {
                    Ter.fam=Fam1;
                    Console.WriteLine("Владелец " + Fam + " заменен на " + Fam1);
                }
                break;
            }        
         Menu();
        }
 
        static void Ans3()
        {
            string Fam;
            int j=0, Summ;
            Console.Write("Введите фамилию владельца: ");
            Fam = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
               Console.WriteLine("Сумма на счету: "+Ter.summ);
               Console.Write("Введите сумму для снятия: ");
               Summ = int.Parse(Console.ReadLine());
               break;
            }
            Menu();
        }
 
        static void Ans4()
        {
            string Fam;
            int Summ;
            Console.Write("Введите фамилию владельца: ");
            Fam = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
               Console.Write("Введите сумму: ");
               Summ = int.Parse(Console.ReadLine());
               Ter.summ = Ter.summ + Summ;
               Console.WriteLine("Cумма на счету: " + Ter.summ);
               break;
            }            
          Menu();
        }
 
        static void Ans5()
        {
            string Fam;
            Console.Write("Введите фамилию владельца: ");
            Fam = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
               Console.WriteLine("Сумма на счету: " + Ter.summ);
               Console.WriteLine("Процент начисления: " + Ter.proc);
               Ter.summ = (Ter.proc / 100) * Ter.summ + Ter.summ;
               Console.WriteLine("Проценты начисленны!");
               Console.WriteLine("Сумма на счету: " + Ter.summ);
               break;
            }
            Menu();
        }
 
        static void Ans6()
        {
            string Fam;
            double Dol = 73.19, Summ;
            Console.Write("Введите фамилию владельца: ");
            Fam = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
               Console.WriteLine("Сумма на счету: " + Ter.summ);
               Console.WriteLine("Курс Доллара: " + Dol);
               Summ = Ter.summ/Dol;
               Console.WriteLine("Деньги перведенны в Доллары!");
               Console.WriteLine("Сумма в Долларах: " + Summ);
               break;
            }
            Menu();
        }
 
        static void Ans7()
        {
            string Fam;
            double Evr = 80.12, Summ;
            Console.Write("Введите фамилию владельца: ");
            Fam = Console.ReadLine();
            foreach(var Ter in accounts)
            if (Ter.fam==Fam)
            {
               Console.WriteLine("Сумма на счету: " + Ter.summ);
               Console.WriteLine("Курс Евро: " + Evr);
               Summ = Ter.summ / Evr;
               Console.WriteLine("Деньги перведенны в Евро!");
               Console.WriteLine("Сумма в Евро: " + Summ);
               break;
            }
            Menu();
        }
 
    static int Menu()
    {   int ans;
        Console.WriteLine();
        Console.WriteLine("Выберите действие: ");
        Console.WriteLine("   1 - Вывести информацию о счете на экран");
        Console.WriteLine("   2 - Сменить владельца счета");
        Console.WriteLine("   3 - Снять деньги со счета");
        Console.WriteLine("   4 - Добавить деньги на счет");
        Console.WriteLine("   5 - Начислить проценты");
        Console.WriteLine("   6 - Перевести сумму в Доллары");
        Console.WriteLine("   7 - Перевести сумму в Евро");
        Console.WriteLine("   0 - Выход");
        ans = int.Parse(Console.ReadLine());
        if (ans==1) 
        {Ans1();}
        if (ans==2) 
        {Ans2();}
        if (ans==3) 
        {Ans3();}
        if (ans==4) 
        {Ans4();}
        if (ans==5) 
        {Ans5();}
        if (ans==6) 
        {Ans6();}
        if (ans==7) 
        {Ans7();}
        return 0;
    }
 
    static void Main()
        {
            accounts = new List<Account>();
            accounts.Add(new Account ("Иванов", 85749382, 6.3, 14875));
            accounts.Add(new Account ("Максимов", 46382967, 16.8, 38859));
            accounts.Add(new Account("Петров", 16285936, 2.6, 3748));
            accounts.Add(new Account("Александров", 27395738, 26.2, 48372));
            accounts.Add(new Account("Дмитров", 95748293, 11.4, 84738));
            Menu();
        }
        }
    }

Переделал вот так, все равно ошибки

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        class Dr
        {
           private string name;
           private string surname;
           private int age;
           private List<Dr> Dir;
 
            public string name
            {
                get { return Name; }
                set { Name = value; }
            }
            public string surname
            {
                get { return Surname; }
                set { Surname = value; }
            }
            public int age
            {
                get { return Age; }
                set { Age = value; }
            }
 
 
             public Dr(string Name, string Surname, int Age)
            {
              this.name = Name;
              this.surname = Surname;
              this.age = Age;
            }
 
        }
        public Form1()
        {
            InitializeComponent();
        }
 
        static void Main
        {
           directors = new List<Dr>();
           directors.Add(new Dr ("Александр", "Иванов", 36))
           
 
        
        }
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
          
            switch (e.Node.Name)
            { 
                case "Директор":
                {
                    panel1.Visible = true;
                }
                break;
                case "Третий":
                {
                    panel1.Visible = false;
                }
                break;
            }
        }
    }
}

Добавлено через 21 минуту
Нашла ошибки, исправила. Но осталась все та же ошибка

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        class Dr
        {
           private string Name;
           private string Surname;
           private int Age;
           private List<Dr> Dir;
 
            public string name
            {
                get { return Name; }
                set { Name = value; }
            }
            public string surname
            {
                get { return Surname; }
                set { Surname = value; }
            }
            public int age
            {
                get { return Age; }
                set { Age = value; }
            }
 
 
             public Dr(string Name, string Surname, int Age)
            {
              this.name = Name;
              this.surname = Surname;
              this.age = Age;
            }
 
        }
 
        class Proc
        {
          static List<Dr> directors;    
        }
        public Form1()
        {
            InitializeComponent();
        }
 
        static void Main
        {
           directors = List<Dr>();
           directors.Add(new Dr ("Александр", "Иванов", 36))
               
        }
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
          
            switch (e.Node.Name)
            { 
                case "Директор":
                {
                    panel1.Visible = true;
                }
                break;
                case "Третий":
                {
                    panel1.Visible = false;
                }
                break;
            }
        }
    }
}

Добавлено через 41 секунду
A get or set accessor expected



0



332 / 295 / 134

Регистрация: 14.03.2015

Сообщений: 1,087

Записей в блоге: 1

17.05.2016, 22:22

4

Цитата
Сообщение от Maray
Посмотреть сообщение

осталась все та же ошибка

Цитата
Сообщение от Maray
Посмотреть сообщение

A get or set accessor expected

На каком моменте появляется ошибка? Брейкпоинтами отследите чтоль.

Не по теме:

Большие участки кода помещайте в блок

Код

[SPOILER] ваш код здесь [/SPOILER]



0



Формулировка задачи:

using System;
  using System.IO;
  using System.Text;
  using System.Threading;
 
  namespace optimizationMethods {
  public class MethodSegmentIntoThree
{
 
  public static readonly double EPS = 0.0001;
  public static double f (double x)
   { 
      return (Math.Sqrt(x*x + 25) + Math.Sqrt ((20-x)*(20-x)+100) +0.1);
   }

  public static double[] setSegment() throws IOException //просит поставить
     // точку с запятой перед throws error CS1002: ; expected
     { 
       double[] x = new double[4]; //выдаёт  error CS1014: A get or set 
                                   // accessor expected
         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
         Console.WriteLine("Введите отрезок [a; b], на котором будем искать стационарную точку");
 
         Console.WriteLine("x1 = ");
         x[0] = Double.parseDouble(reader.readLine());
 
         x[1] = 0; x[2] = 0;
         Console.WriteLine("x4= ");
         x[3] = Double.parseDouble(reader.readLine());
 
         System.out.prinln("Ищем стационарную точку...");
 
         return x;
}
 
         public static double segIntoThree (double[] x) 
         {
               while ( Math.Abs(x[3] - x[0] ) >=EPS )
               {   
                   x[1]=x[0]+(x[3]-x[0])/3;
                   x[2]=x[3]-(x[3]-x[0])/3;
                 if (f(x[1]) < f(x[2]))
                      x[3]= x[2];
              else
                     x[0] = x[1];
                }
           return (x[0] + x[3] ) / 2;
         }
        public static void main(string[] args)
        {
           try
            {
                  double[] x = setSegment();
                  Console.WriteLine("Точка минимума z = " + segIntoThree(x));
                  Console.WriteLine("f(z) = " +f(segIntoThree(x)));
                  Console.WriteLine("Значение функции(для проверки): f(z) = f(3) = " +f(6.6667));
         }
         catch (IOException e)
          {
             e.printStackTrace();
          }
     }
} }

Код к задаче: «Причина ошибки «A get or set accessor expected»»

textual

using System;
  using System.IO;
  using System.Text;
  using System.Threading;
  
  
 
  namespace optimizationMethods {
  public class MethodSegmentIntoThree
{
 
  public static readonly double EPS = 0.0001;
  public static double f (double x)
   { 
      return (Math.Sqrt(x*x + 25) + Math.Sqrt ((20-x)*(20-x)+100) +0.1);
   }
 
 
  public static double[] setSegment()
     { 
       double[] x = new double[4]; 
         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); 
//error CS1041: Identifier expected; 'in' is a keyword
// the type of namespace bufferedreader could not be found
//  the type of namespace InputStreamReader could not be found
// error CS1525: Invalid expression term 'in
         Console.WriteLine("Введите отрезок [a; b], на котором будем искать стационарную точку");
 
         Console.WriteLine("x1 = ");
         x[0] = Double.parseDouble(reader.readLine());
 
         x[1] = 0; x[2] = 0;
         Console.WriteLine("x4= ");
         x[3] = Double.parseDouble(reader.readLine());
 
         System.out.prinln("Ищем стационарную точку...");
 
         return x;
}
 
         public static double segIntoThree (double[] x) 
         {
               while ( Math.Abs(x[3] - x[0] ) >=EPS )
               {   
                   x[1]=x[0]+(x[3]-x[0])/3;
                   x[2]=x[3]-(x[3]-x[0])/3;
                 if (f(x[1]) < f(x[2]))
                      x[3]= x[2];
              else
                     x[0] = x[1];
                }
           return (x[0] + x[3] ) / 2;
         }
        public static void main(string[] args)
        {
           try
            {
                  double[] x = setSegment();
                  Console.WriteLine("Точка минимума z = " + segIntoThree(x));
                  Console.WriteLine("f(z) = " +f(segIntoThree(x)));
                  Console.WriteLine("Значение функции(для проверки): f(z) = f(3) = " +f(6.6667));
         }
         catch (IOException e)
          {
             e.printStackTrace();
//error CS1061: 
//'System.IO.IOException' does not contain a definition for 'printStackTrace' and no extension method 'printStackTrace' //accepting a first argument of type 'System.IO.IOException' could be found (are you missing a using directive or an //assembly reference?)
 
          }
     }
} }

Полезно ли:

5   голосов , оценка 3.600 из 5

using System.Collections.Generic;
using UnityEngine;

public class playercombat : MonoBehaviour
{

    public Animator animator;
    public Transform attackPoint;
    public float attackRange = 0.5f;
    public LayerMask enemyLayers;

    public float AttackRange { get => attackRange; 0.5f => attackRange = 0.5f; }
   

    // Update is called once per frame
    void Update()
    {
       if (Input.GetKeyDown(KeyCode.Q))
        {
            Attack();
        }
    }
    void Attack()
    {
        animator.SetTrigger("Attack");

        Physics2D.OverlapCircleAll(attackPoint.postion, AttackRange, enemyLayers);

        foreach (Collider2D enemy in hitEnemies) 
        {
            Debug.lot("Hit" + enemy.name);
        }
    }
    void OnDrawGizmosSelected()
    {
        if (attackPoint == null)
            return;
        Gizmos.DrawWireSphere(attackPoint.position, AttackRange);
    }
}


A get or set accesssor expected. What does that mean and how should I fix it?
Assetsplayercombat.cs(13,52): error CS1014: A get or set accessor expected
Assetsplayercombat.cs(13,60): error CS1014: A get or set accessor expected

Your setter on AttackRange is weird. KYL3R’s answer implies that you want to set attackRange to 0.5f whenever you set it, no matter what you set it to. That seems equally weird. I think you want

public float AttackRange { get => attackRange; set => attackRange = value; }

Понравилась статья? Поделить с друзьями:
  • Error cs1012 too many characters in character literal
  • Error cs1011 empty character literal
  • Error cs1010 newline in constant
  • Error cs1009 нераспознанная escape последовательность
  • Error cs1003 синтаксическая ошибка требуется