O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Missing

Synopsis

Because C# (as well as some other languages) does not allow optional parameters, Missing allows those languages to pass this value to indicate that a value will not be specified for those optional parameters. The only way to access an instance of this class — there can only be one — is by the return value of the static field, called Value.

public sealed class Missing {
// Public Static Fields
   public static readonly field Missing Value;                   // =System.Reflection.Missing
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required