When using the VCFileCodeModel or the FileCodeModel interface to create a constructor by passing vsCMFunction.vsCMFunctionConstructor as the functionkind for the AddFunction function, the constructor gains a return type.
This piece of code is what i want to generate:
X::X()
{
}
Calling this generates a function with return type (source being a FileCodeModel representing a source file):
source.AddFunction("X::X" , vsCMFunction.vsCMFunctionConstructor, null, -1,vsCMAccess.vsCMAccessDefault);
replacing the null with any of these values make no difference:
"X"
vsCMTypeRef.vsCMTypeRefVoid
vsCMTypeRef.vsCMTypeRefCodeType
vsCMTypeRef.vsCMTypeRefOther
Everyone except the "X" string as a return type defaults to int like below:
int X::X()
{
}