当试图为具有相同类名的类创建构造函数时。为什么会抛出如下错误:
" Error: 'StaveProcessor': member names cannot be the same as their enclosing type"
代码 :
namespace ImageProcessing
{
class StaveProcessor
{
public Bitmap stave;
public StaveProcessor(Bitmap image) //constructor
{
stave = image;
}
}
}
如何解决这个问题并创建构造函数?
ps:请认为我自己不是专家,请原谅我问愚蠢的问题,并帮助我学习和识别。谢谢你