Вопрос, что сделать и как, чтобы пропала ошибка о создании новой страницы защиты для стека
Я учу c# по видео урокам от ItProger. И я уже на 19 уроке по операторам is и as. И когда я проходил код он писал массив из объектов через List(я все за ним повторял) у него все хорошо выводилось, а у меня выводит эту ошибку. Помогите пожалуйста
ЭТО ГЛАВНЫЙ КЛАСС
using System;
using System.Collections.Generic;
namespace project
{
class Program
{
static void Main()
{
List<Robot> robots = new List<Robot>();
robots.Add(new Robot("Alex", 400, new byte[] { 0, 0, 40 }));
robots.Add(new Robot("Bob", 1600, new byte[] { 0, 56, 10 }));
robots.Add(new Robot("Tim", 300, new byte[] { 12, 0, 30 }));
robots.Add(new Robot("Max", 900, new byte[] { 1, 0, 20 }));
foreach (Robot obj in robots)
{
System.Console.WriteLine(obj.Name);
}
}
}
}
А ЭТО ДРУГОЙ КЛАСС ОТНОСЯЩИЙСЯ К ГЛАВНОМУ
using System;
namespace project
{
class Robot
{
public static int count;
private string name;
private int weight;
private byte[] coordinates;
public string Name
{
get
{
return Name;
}
private set { }
}
protected int damage;
public int Weight
{
get
{
System.Console.Write("результат : ");
return this.weight;
}
set
{
if (value < 1)
this.weight = 1;
else if (value > 5000)
this.weight = 5000;
else
this.weight = value;
}
}
public int Width { get; set; }
public Robot(string name, int weight, byte[] coordinates)
{
Console.WriteLine("someText");
this.setValues(name, weight, coordinates);
count++;
}
public Robot(string name)
{
System.Console.WriteLine("someText");
this.name = name;
count++;
}
public Robot()
{
count++;
}
public void setValues(string name, int weight, byte[] coordinates)
{
this.name = name;
this.weight = weight;
this.coordinates = coordinates;
}
public void printValues()
{
Console.WriteLine(this.name + this.weight);
foreach (byte el in this.coordinates)
Console.WriteLine(el);
}
public static void Print()
{
Console.WriteLine("Im hero" + count);
}
}
}