How can I reference an indexed property with CodeDOM?
How can I add index parameters to a reference to a property through CodeDom? With a CodeMethodInvokeExpression I am able attach a list of parameters:
CodeMethodInvokeExpression methodInvokeExpression = new CodeMethodInvokeExpression(new CodeVariableRe开发者_如何学编程ferenceExpression("myVariableName"), "SomeMethodName",parameters);
However I don't see anything about index properties with the CodePropertyReferenceExpression.
Use the CodeIndexerExpression class.
精彩评论