all groups > dotnet interop > july 2003 >
You're in the

dotnet interop

group:

Optional parameter to COM components


Optional parameter to COM components Jinlei Zhang
7/25/2003 11:01:46 AM
dotnet interop: Some functions of COM components have optional parameters. When imported
into C#, the generated functions assume all parameters to be present. Is
there any way to call COM functions with optional functions? Thanks in
advance.

- Jinlei.

Optional parameter to COM components Chris Arps
7/25/2003 11:28:13 AM
Assuming an optional second parameter

using System.Reflection

object optParam = System.Reflection.Missing.Value;
double required = 1.0;

someCall(required, optParam);


[quoted text, click to view]
AddThis Social Bookmark Button