Show / Hide Table of Contents

# Class CharIterator

CharIterator is an iterator type that can be used to traverse CharData in the current e_text element. For a sample use case, please take a look at ElementReaderAdv sample project.

##### Inheritance

object
CharIterator

##### Implements

IDisposable

##### Inherited Members

object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.PDF

###### Assembly: PDFNet.dll

##### Syntax

    public class CharIterator : IDisposable

### Methods

#### Current()

Gets the current `CharData` value

##### Declaration

    public CharData Current()

##### Returns

Type | Description
--- | ---
CharData | current Unicode value

#### Dispose()

Releases all resources used by the CharIterator

##### Declaration

    public override sealed void Dispose()

#### Dispose(bool)

##### Declaration

    [HandleProcessCorruptedStateExceptions]
    protected virtual void Dispose(bool A_0)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | A_0 |

#### Equals(object)

checks if this CharData object is the same as the given object

##### Declaration

    public bool Equals(object o)

##### Parameters

Type | Name | Description
--- | --- | ---
object | o | a given object

##### Returns

Type | Description
--- | ---
bool | true if equals to the give object

#### ~CharIterator()

Allows a CharIterator to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

##### Declaration

    protected ~CharIterator()

#### HasNext()

Determines if the iteration has more elements.

##### Declaration

    public bool HasNext()

##### Returns

Type | Description
--- | ---
bool | Returns true if the iteration has more elements.

#### Next()

Iterates to the next object in the iteration

##### Declaration

    public void Next()

### Operators

#### operator ==(CharIterator, CharIterator)

Equality operator checks whether two CharData objects are the same

##### Declaration

    public static bool operator ==(CharIterator l, CharIterator r)

##### Parameters

Type | Name | Description
--- | --- | ---
CharIterator | l | the `CharData` on the left of the operator
CharIterator | r | the `CharData` on the right of the operator

##### Returns

Type | Description
--- | ---
bool | true if both objects are equal

#### operator !=(CharIterator, CharIterator)

Inequality operator checks whether two CharData objects are different

##### Declaration

    public static bool operator !=(CharIterator l, CharIterator r)

##### Parameters

Type | Name | Description
--- | --- | ---
CharIterator | l | the `CharData` on the left of the operator
CharIterator | r | the `CharData` on the right of the operator

##### Returns

Type | Description
--- | ---
bool | true if both objects are not equal

### Implements

IDisposable