StringSegment.Implicit Operator
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.
Implicit(StringSegment to ReadOnlyMemory<Char>) |
Creates a see ReadOnlyMemory<T> from the given StringSegment. |
Implicit(StringSegment to ReadOnlySpan<Char>) |
Creates a see ReadOnlySpan<T> from the given StringSegment. |
Implicit(String to StringSegment) |
Creates a new StringSegment from the given String. |
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Creates a see ReadOnlyMemory<T> from the given StringSegment.
public:
static operator ReadOnlyMemory<char>(Microsoft::Extensions::Primitives::StringSegment segment);
public static implicit operator ReadOnlyMemory<char> (Microsoft.Extensions.Primitives.StringSegment segment);
static member op_Implicit : Microsoft.Extensions.Primitives.StringSegment -> ReadOnlyMemory<char>
Public Shared Widening Operator CType (segment As StringSegment) As ReadOnlyMemory(Of Char)
Parameters
- segment
- StringSegment
The StringSegment to convert to a ReadOnlyMemory<T>.
Returns
Applies to
.NET 9 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Creates a see ReadOnlySpan<T> from the given StringSegment.
public:
static operator ReadOnlySpan<char>(Microsoft::Extensions::Primitives::StringSegment segment);
public static implicit operator ReadOnlySpan<char> (Microsoft.Extensions.Primitives.StringSegment segment);
static member op_Implicit : Microsoft.Extensions.Primitives.StringSegment -> ReadOnlySpan<char>
Public Shared Widening Operator CType (segment As StringSegment) As ReadOnlySpan(Of Char)
Parameters
- segment
- StringSegment
The StringSegment to convert to a ReadOnlySpan<T>.
Returns
Applies to
.NET 9 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Creates a new StringSegment from the given String.
public:
static operator Microsoft::Extensions::Primitives::StringSegment(System::String ^ value);
public static implicit operator Microsoft.Extensions.Primitives.StringSegment (string? value);
static member op_Implicit : string -> Microsoft.Extensions.Primitives.StringSegment
Public Shared Widening Operator CType (value As String) As StringSegment
Parameters
- value
- String
The String to convert to a StringSegment.
Returns
Applies to
.NET 9 (package-provided) 和其他版本
产品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |