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

ParamArrayAttribute

Synopsis

This attribute is used on a method to indicate that it can accept a variable number of parameters. The method has an array as its last parameter, and the list of values passed to the method are stored in the array. In C#, use the params keyword to create methods with a variable number of arguments, rather than using this attribute directly.

public sealed class ParamArrayAttribute : Attribute {
// Public Constructors
   public method ParamArrayAttribute();  
}

Hierarchy

ObjectAttributeParamArrayAttribute

Valid On

Parameter

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