Question

I am using a T4 to create my interface, however the only issue I am having is if my methods have optional parameters, I am not adding them to the interface.

I'm using EnvDTE to get the information and I have the CodeParameter, but do not see a way to tell it parameter has optional value.

Anyway to tell if the parameter has an optional value?

Was it helpful?

Solution

Try using CodeParameter2 instead. It has a ParameterKind property, which can be set to vsCMParameterKindOptional, and a DefaultValue property.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top