0

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?

jaekie
  • 2,283
  • 4
  • 30
  • 52

1 Answers1

2

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

Matt Ward
  • 47,057
  • 5
  • 93
  • 94