Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Optional Parameters in C#

RSS
Modified on Thu, Apr 01, 2010, 2:56 PM by Administrator Categorized as ·Net Framework
Visual Basic.NET allows optional parameters, whereas C# does not. If a method is written in VB.NET with optional parameters, how do you call it from C# code without specifying the default value for each optional parameter? Use the Type.Missing construct.

Example
file.Save(Type.Missing);

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.