Default Parameters in c#

S

Sunil

I have a com object i imported using tblimp.
Iam creating an object using server.createobject.
everything works fine in VB#.
when using c# i discovered that there are default
parameters which were not passed in vb function.
These are of type object when i looked using ildasm.

when i convert to the same code, c# compiler is asking for
the default parameters. I gave null but does not seem to
work.

How can i pass default parameters in c#.
Thanks
 
S

Sunil

finally found it.
Missing.Value from system.reflection class must be used
for default paremeters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top