Is there anyway to pass a parameter to a property in C# like you would in vb
I have some old VB
code that wraps an XPath search to "touch" the path and then set or return the value. So you can have an xml object with just "<ROOT_NODE />" and call:
xmlObject.E("ROOT_NODE/CHILD/VALUE") = "1"
The above would create the "CHILD" node and the "VALUE" node and give the "VALUE" node a text of "1". The XPath is passed as a parameter of the property. So now I need to see if I can make a backwards compatible version in C#. I have the "touch" logic working I just do not know how to make the syntax work the same.
Does anyone know how to do this in C#?