# Diagnostic(string,DiagnosticSeverity)

Constructor in [Diagnostic](https://docs.yarnspinner.dev/2.0/api/csharp/yarn.compiler/yarn.compiler.diagnostic)

## Summary

```csharp
public Diagnostic(string message, DiagnosticSeverity severity = DiagnosticSeverity.Error)
```

## Parameters

| Name                                                                                                                                                                                   | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `string` message                                                                                                                                                                       |             |
| [Yarn.Compiler.Diagnostic.DiagnosticSeverity](https://docs.yarnspinner.dev/2.0/api/csharp/yarn.compiler/yarn.compiler.diagnostic/yarn.compiler.diagnostic.diagnosticseverity) severity |             |
