Char..::..IsSurrogate Method (String, Int32)
Indicates whether the character at the specified position in a specified string has a surrogate code unit.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public static bool IsSurrogate( string s, int index )
<TemplateAttribute> _ Public Shared Function IsSurrogate ( _ s As String, _ index As Integer _ ) As Boolean
[TemplateAttribute] public: static bool^ IsSurrogate( String^ s, int^ index )
Parameters
- s
- Type: System..::..String
A string.
- index
- Type: System..::..Int32
The position of the character to evaluate in s.
Return Value
true if the character at position index in s is a either a high surrogate or a low surrogate; otherwise, false.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | s is null. |
System..::..ArgumentOutOfRangeException | index is less than zero or greater than the last position in s. |