# CodeDiagnostic class

Namespace: [Grasshopper2.Expressions](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.expressions.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class CodeDiagnostic
```

Represents a single message generated by the compiler.

## Properties

- [Column](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/column.md): Gets the column index of the first offending character, if available. This property will yield -1 if no column is known.
- [Description](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/description.md): Gets the description of the diagnostic.
- [IsError](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/iserror.md): Gets whether this diagnostic qualifies as an error.
- [IsWarning](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/iswarning.md): Gets whether this diagnostic qualifies as a warning.
- [Length](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/length.md): Length of code implicated.
- [Line](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/line.md): Gets the line number of the first offending character, if available. This property will yield -1 if no line number is known.
- [Location](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/location.md): Index of first character of implicated code.

## Methods

- [CreateError](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/createerror.md): (static) Create a new error.
- [CreateHint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/createhint.md): (static) Create a new hint or informational message.
- [CreateWarning](https://developer.rhino3d.com/api/gh2/type/grasshopper2.expressions.codediagnostic/createwarning.md): (static) Create a new warning.
