DelegateDeclaration Class
Represents a delegate declaration.
public class DelegateDeclaration : TypeDeclaration, IParametrableTypeExample
var del = new DelegateDeclaration("MyDelegate");
del.ReturnType = typeof(void);
del.Arguments.Add(new MethodArgumentDeclaration(typeof(string), "message"));
Assert.Equal("""
delegate void MyDelegate(string message);
""", del.ToCsharpString());- Inheritance
TypeDeclarationDelegateDeclaration- Implements
Constructors
| Name | Description |
|---|---|
| DelegateDeclaration() | |
| DelegateDeclaration(string?) | Initializes a new instance of the DelegateDeclaration class with the specified name. |
DelegateDeclaration overloads
DelegateDeclaration()
DelegateDeclaration.cspublic DelegateDeclaration()No documentation is available.
DelegateDeclaration(string?)
DelegateDeclaration.csInitializes a new instance of the DelegateDeclaration class with the specified name.
public DelegateDeclaration(string? name)Parameters
namestring?- The delegate name.
Properties
| Name | Description |
|---|---|
| Arguments | |
| Parameters | |
| ReturnType |
Arguments
DelegateDeclaration.csParameters
DelegateDeclaration.cspublic CodeObjectCollection<TypeParameter> Parameters { get; }Property value
No documentation is available.