СПРОСИ ПРОФИ

Кирилл

Пользователь Ask.profi.ru
Вопросов1
Ответов 0
Рейтинг 0

Вопросы:


👍
0
👎

Что не так в коде на с#?   1 ответ

using System;


namespace project {

class Robot{

private string name;
private int weight;
private byte[] coordinates;

public void sv(string name1, int weight1, byte[] coordinates1) {
name = name1;
weight = weight1;
coordinates = coordinates1;
}
public void sp() {
System.Console.WriteLine(name + " weight: " + weight + " coordinates:");
foreach(byte el in coordinates);
System.Console.WriteLine(el);

}
}
}
Пишет что в строке System.Console.WriteLine(el); el не существует в данном контексте, почему?

ASK.PROFI.RU © 2020-2024