我试图弄清楚  this [string name]声明中的含义public string this[string name]
完整代码:
public class PersonImplementsIDataErrorInfo : IDataErrorInfo
{
    private int age;
    public int Age
    {
        get { return age; }
        set { age = value; }
    }
    public string Error
    {
        get
        {
            return "";
        }
    }
    public string this[string name]
    {
        get
        {
            string result = null;
            if (name == "Age")
            {
                if (this.age < 0 || this.age > 150)
                {
                    result = "Age must not be less than 0 or …Run Code Online (Sandbox Code Playgroud) 我正在使用c ++和OpenCv库开发计算机视觉项目.我经常在研究过程中看到那种代码:
image_是一个cv :: Mat 
c是一个int
cv::Mat cluster = (image_ == c)*255;
Run Code Online (Sandbox Code Playgroud)
我认为它在集群中放了一个布尔值,但我不太确定.