Property with parameter

后端 未结 3 934
花落未央
花落未央 2021-01-12 02:27

I got something strange into VB.NET, never notice before...

I have a class in VB.NET having a property with parameter and

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 02:28

    Parameterised Properties are converted to get_ and set_ methods.

    string name = "Foo";
    string value = "Bar";
    MyObject.set_AsString(name, value);
    string fooValue = MyObject.get_AsString(name);
    

提交回复
热议问题