Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Type.Missing vs. System.Reflection.Missing.Value as WSF parameters?

When I want to call an Excel-Worksheetfunction from my C# AutomationAddIn
which takes many parameters (such as SUM), in which case should I use
Type.Missing for the missing parameters and in which case should I use
System.Reflection.Missing.Value instead? Is there a difference in
functionality or performance? I've come across both.

Fabz


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Type.Missing vs. System.Reflection.Missing.Value as WSF parameters?

I just stumbled upon this. In the book "Visual Studio Tools for Office 2007"
(Eric Carter, Eric Lippert) the authors write:

"In C#, you must pass a special value to optional parameters that are of
type object if you do not want to specify the parameter. This special value
is called System.Type.Missing, and it must be passed for optional parameters
that you do not want to specify directly (unlike Visual Basic in which oyu
can omit the parameter entirely). In VSTO projects, a "missing" variable is
predeclared for you (that is set to System.Type.Missing). Therefore, VSTO
code, you will often see missing pased rather than System.Type.Missing."

Doesn't exactly answer my question, but since the two guys seem to form part
of MS's developer team, they certainly know why they recommend doing it this
way.
Fabz


"Fabz" wrote in message
...
When I want to call an Excel-Worksheetfunction from my C# AutomationAddIn
which takes many parameters (such as SUM), in which case should I use
Type.Missing for the missing parameters and in which case should I use
System.Reflection.Missing.Value instead? Is there a difference in
functionality or performance? I've come across both.

Fabz



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MISSING: ReportBuilderAddIn 1.0 Type Library Tinka Steven Excel Programming 0 June 6th 08 10:26 AM
Missing system file in excel Serge Setting up and Configuration of Excel 5 May 27th 06 10:06 PM
Missing Type Library Daves_Solutions Excel Programming 2 April 12th 06 04:09 PM
On Error? Creates 1 missing worksheet then never detects any other missing worksheets Craigm[_35_] Excel Programming 2 August 1st 05 02:39 PM
MISSING:shappmgrp 1.0 Type Library Gary Bartlett Excel Programming 3 November 29th 03 05:36 PM


All times are GMT +1. The time now is 04:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"