StringExtensions.DangerousGetReference(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.