即时得到一个错误在我的C#代码,我无法弄清楚,为什么错误扩展Shape类
namespace Memory
{
class Meme : Shape
{
public int used { get; set; }
public string name { get; set; }
protected override Geometry DefiningGeometry => throw new NotImplementedException();
}
}
错误即时得到的是:
System.NotImplementedException:“方法或操作未实现。'
代码创建实例:
options.Add(new Meme()
{
name = option,
used = 0,
Width = 50,
Height = 50,
Fill = Brushes.Red
});
您是否在代码中看到'throw new NotImplementedException()'行? –
你的DefiningGeometry引发了这个异常。仔细阅读代码。 – Harsh
所以即时通讯非常新,但它通过添加该行自动完成我的课程, –