CodeParameterDeclarationExpression Constructor (String, String)

CodeParameterDeclarationExpression Constructor (String, String)

 

Initializes a new instance of the CodeParameterDeclarationExpression class using the specified parameter type and name.

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

public CodeParameterDeclarationExpression(
	string type,
	string name
)

Parameters

type
Type: System.String

The type of the parameter to declare.

name
Type: System.String

The name of the parameter to declare.

If the type parameter references a generic type, it must follow the syntax conventions for generic types. Generic types are formatted as follows: the name of the type, followed by a grave accent ("`"), followed by a count of the generic type arguments, followed by the parameters delimited with brackets.

System_CAPS_noteNote

You must use square brackets ([]) and not the C# angle brackets (<>) to delimit generic parameters.

To avoid the possibility of making a syntactic mistake, consider using the CodeParameterDeclarationExpression(Type, String) constructor that takes a type instead of a string as a parameter.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft