Editar

Compartilhar via


StringExtensions.DangerousGetReferenceAt(String, Int32) Method

Definition

Returns a reference to an element at a specified index within a given String, with no bounds checks.

public static ref char DangerousGetReferenceAt (this string text, int i);
static member DangerousGetReferenceAt : string * int -> char
<Extension()>
Public Function DangerousGetReferenceAt (text As String, i As Integer) As Char

Parameters

text
String

The input String instance.

i
Int32

The index of the element to retrieve within text.

Returns

A reference to the element within text at the index specified by i.

Remarks

This method doesn't do any bounds checks, therefore it is responsibility of the caller to ensure the i parameter is valid.

Applies to