Modifier

Partager via


StringExtensions.DangerousGetReference(String) Method

Definition

Returns a reference to the first element within a given String, with no bounds checks.

public static ref char DangerousGetReference (this string text);
static member DangerousGetReference : string -> char
<Extension()>
Public Function DangerousGetReference (text As String) As Char

Parameters

text
String

The input String instance.

Returns

A reference to the first element within text, or the location it would have used, if text is empty.

Remarks

This method doesn't do any bounds checks, therefore it is responsibility of the caller to perform checks in case the returned value is dereferenced.

Applies to