CharacterBufferRange Constructors

Definition

Initializes a new instance of the CharacterBufferRange structure.

Overloads

CharacterBufferRange(Char*, Int32)

Initializes a new instance of the CharacterBufferRange structure from a unmanaged character string.

CharacterBufferRange(Char[], Int32, Int32)

Initializes a new instance of the CharacterBufferRange structure from a character array.

CharacterBufferRange(String, Int32, Int32)

Initializes a new instance of the CharacterBufferRange structure from a character string.

CharacterBufferRange(Char*, Int32)

Important

This API is not CLS-compliant.

Initializes a new instance of the CharacterBufferRange structure from a unmanaged character string.

C#
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public CharacterBufferRange(char* unsafeCharacterString, int characterLength);
C#
[System.CLSCompliant(false)]
public CharacterBufferRange(char* unsafeCharacterString, int characterLength);

Parameters

unsafeCharacterString
Char*

An unmanaged pointer reference to a character string.

characterLength
Int32

The number of characters in unsafecharacterString to use.

Attributes

Remarks

The caller needs unmanaged code permission in order to invoke the CharacterBufferRange method.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CharacterBufferRange(Char[], Int32, Int32)

Initializes a new instance of the CharacterBufferRange structure from a character array.

C#
public CharacterBufferRange(char[] characterArray, int offsetToFirstChar, int characterLength);

Parameters

characterArray
Char[]

The character array.

offsetToFirstChar
Int32

The character buffer offset to the first character.

characterLength
Int32

The number of characters in characterArray to use.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CharacterBufferRange(String, Int32, Int32)

Initializes a new instance of the CharacterBufferRange structure from a character string.

C#
public CharacterBufferRange(string characterString, int offsetToFirstChar, int characterLength);

Parameters

characterString
String

The character string.

offsetToFirstChar
Int32

The character buffer offset to the first character.

characterLength
Int32

The number of characters in characterString to use.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10