Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
System Namespace
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
ParamArrayAttribute Class

Updated: November 2007

Indicates that the method will allow a variable number of arguments in its invocation. This class cannot be inherited.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Visual Basic (Declaration)
<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.Parameter, Inherited := True, AllowMultiple := False)> _
Public NotInheritable Class ParamArrayAttribute _
    Inherits Attribute
Visual Basic (Usage)
Dim instance As ParamArrayAttribute
C#
[ComVisibleAttribute(true)]
[AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
public sealed class ParamArrayAttribute : Attribute
Visual C++
[ComVisibleAttribute(true)]
[AttributeUsageAttribute(AttributeTargets::Parameter, Inherited = true, AllowMultiple = false)]
public ref class ParamArrayAttribute sealed : public Attribute
J#
/** @attribute ComVisibleAttribute(true) */
/** @attribute AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false) */
public final class ParamArrayAttribute extends Attribute
JScript
public final class ParamArrayAttribute extends Attribute

A parameter array allows the specification of an unknown number of arguments. A parameter array must be the last parameter in a formal parameter list, and it must be a single-dimension array. A parameter array permits arguments to a method to be specified in two ways:

  • A single expression of a type that is implicitly convertible to the parameter array type. The parameter array functions as a value parameter.

  • Zero or more arguments where each argument is an expression of a type that is implictly convertible to the type of the parameter array element.

For more information about using attributes, see Extending Metadata Using Attributes.

System..::.Object
  System..::.Attribute
    System..::.ParamArrayAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 2.0, 1.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker