JsonProperty.NameEquals 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.
Overloads
NameEquals(ReadOnlySpan<Byte>) |
Compares the specified UTF-8 encoded text to the name of this property. |
NameEquals(ReadOnlySpan<Char>) |
Compares the specified text as a character span to the name of this property. |
NameEquals(String) |
Compares the specified string to the name of this property. |
NameEquals(ReadOnlySpan<Byte>)
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
Compares the specified UTF-8 encoded text to the name of this property.
public:
bool NameEquals(ReadOnlySpan<System::Byte> utf8Text);
public bool NameEquals (ReadOnlySpan<byte> utf8Text);
member this.NameEquals : ReadOnlySpan<byte> -> bool
Public Function NameEquals (utf8Text As ReadOnlySpan(Of Byte)) As Boolean
Parameters
- utf8Text
- ReadOnlySpan<Byte>
The UTF-8 encoded text to compare against.
Returns
true
if the name of this property has the same UTF-8 encoding as utf8Text
; otherwise, false
.
Exceptions
This value's Type is not PropertyName.
Remarks
This method is functionally equal to doing an ordinal comparison of utf8Text
and Name, but it can avoid creating the string instance.
Applies to
NameEquals(ReadOnlySpan<Char>)
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
Compares the specified text as a character span to the name of this property.
public:
bool NameEquals(ReadOnlySpan<char> text);
public bool NameEquals (ReadOnlySpan<char> text);
member this.NameEquals : ReadOnlySpan<char> -> bool
Public Function NameEquals (text As ReadOnlySpan(Of Char)) As Boolean
Parameters
- text
- ReadOnlySpan<Char>
The text to compare against.
Returns
true
if the name of this property matches text
; otherwise, false
.
Exceptions
This value's Type is not PropertyName.
Remarks
This method is functionally equal to doing an ordinal comparison of text
and Name, but it can avoid creating the string instance.
Applies to
NameEquals(String)
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
- Source:
- JsonProperty.cs
Compares the specified string to the name of this property.
public:
bool NameEquals(System::String ^ text);
public bool NameEquals (string? text);
public bool NameEquals (string text);
member this.NameEquals : string -> bool
Public Function NameEquals (text As String) As Boolean
Parameters
- text
- String
The text to compare against.
Returns
true
if the name of this property matches text
; otherwise false
.
Exceptions
This value's Type is not PropertyName.
Remarks
This method is functionally equal to doing an ordinal comparison of text
and Name.