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


Type: System.String

The type of the parameter to declare.

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.


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