# OneNoteDiagnostic

A structured diagnostic emitted while reading or writing OneNote data.

Class 

`OfficeIMO.OneNote`

**Namespace**

`OfficeIMO.OneNote`

**Assembly**

`OfficeIMO.OneNote`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OneNoteDiagnostic.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L20)

**Modifiers**

sealed

A structured diagnostic emitted while reading or writing OneNote data.

## Inheritance

- object
- OneNoteDiagnostic

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Read and Write OneNote Notebooks](/docs/onenote/notebooks/) Guide
  
  Open OneNote notebooks from a folder, a .onetoc2 file or a .onepkg export, walk section groups and sections, and write notebooks offline.

## Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 4

- Property [OneNoteFileHeader.Diagnostics](/api/onenote/officeimo-onenote-onenotefileheader/#property-diagnostics)
- Property [OneNoteNotebook.Diagnostics](/api/onenote/officeimo-onenote-onenotenotebook/#property-diagnostics)
- Property [OneNotePage.Diagnostics](/api/onenote/officeimo-onenote-onenotepage/#property-diagnostics)
- Property [OneNoteSection.Diagnostics](/api/onenote/officeimo-onenote-onenotesection/#property-diagnostics)

Filter members 

Show inherited

## Constructors

`public OneNoteDiagnostic()` [#](#constructor-ctor)

[OneNoteDiagnostic.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L20)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Code { get; set; }` [#](#property-code)

[OneNoteDiagnostic.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L20)

Stable diagnostic identifier.

`public OneNoteDiagnosticSeverity Severity { get; set; }` [#](#property-severity)

[OneNoteDiagnostic.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L23)

Diagnostic severity.

`public string Message { get; set; }` [#](#property-message)

[OneNoteDiagnostic.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L26)

Human-readable diagnostic message.

`public long? Offset { get; set; }` [#](#property-offset)

[OneNoteDiagnostic.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L29)

Optional zero-based byte offset associated with the diagnostic.

`public string? SourcePath { get; set; }` [#](#property-sourcepath)

[OneNoteDiagnostic.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Diagnostics/OneNoteDiagnostic.cs#L32)

Optional source path associated with the diagnostic.

<!-- PowerForge markdown artifact sha256:71BB6E258B84176E1E0C775D5E9558F817F7F22FDF09C013C230A1FFF3AA5CCA -->
