# OfficeDiffHunk

A changed region: old items replaced by new items. Either side can be empty.

Struct 

`OfficeIMO.Diff`

**Namespace**

`OfficeIMO.Diff`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeDiffResult.cs:156](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Diff/OfficeDiffResult.cs#L156)

**Base**

`ValueType`

**Modifiers**

sealed

A changed region: old items replaced by new items. Either side can be empty.

## Inheritance

- ValueType
- OfficeDiffHunk

## Usage

Explore 1 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 1

- Method [OfficeDiffResult<T>.GetChangedRegions](/api/core/officeimo-diff-officediffresult/#method-getchangedregions)

Filter members 

Show inherited

## Constructors

`public OfficeDiffHunk(int oldStart, int oldLength, int newStart, int newLength)` [#](#constructor-ctor-int32-int32-int32-int32)

[OfficeDiffResult.cs:156](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Diff/OfficeDiffResult.cs#L156)

Creates a changed region.

Parameters

**oldStart int required**

**oldLength int required**

**newStart int required**

**newLength int required**

## Inherited Methods

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

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from ValueType

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from ValueType

Returns

`string?`

## Properties

`public int OldStart { get; }` [#](#property-oldstart)

[OfficeDiffResult.cs:163](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Diff/OfficeDiffResult.cs#L163)

Zero-based start in the old sequence.

`public int OldLength { get; }` [#](#property-oldlength)

[OfficeDiffResult.cs:166](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Diff/OfficeDiffResult.cs#L166)

Number of old items removed.

`public int NewStart { get; }` [#](#property-newstart)

[OfficeDiffResult.cs:169](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Diff/OfficeDiffResult.cs#L169)

Zero-based start in the new sequence.

`public int NewLength { get; }` [#](#property-newlength)

[OfficeDiffResult.cs:172](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Diff/OfficeDiffResult.cs#L172)

Number of new items added.

<!-- PowerForge markdown artifact sha256:D184DB998AD439DCF68FED96E9463D8A169537D65C42A319D31CF5EDC26D2B26 -->
