Optional ref keyword when using COM C# with Example



Optional ref keyword when using COM C# with Example

The ref keyword for callers of methods is now optional when calling into methods supplied by COM interfaces. 
Given a COM method with the signature 
void Increment(ref int x); 
the invocation can now be written as either 
Increment(0); //  no  need  for  "ref" or  a  place  holder  variable  any  more 
 

0 Comment's

Comment Form

Submit Comment