StringSegment.Implicit Operator

Definition

Overloads

Implicit(StringSegment to ReadOnlyMemory<Char>)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Creates a see ReadOnlyMemory<T> from the given StringSegment.

C#
public static implicit operator ReadOnlyMemory<char>(Microsoft.Extensions.Primitives.StringSegment segment);

Parameters

segment
StringSegment

The StringSegment to convert to a ReadOnlyMemory<T>.

Returns

Applies to

.NET 10 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)

Implicit(StringSegment to ReadOnlySpan<Char>)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Creates a see ReadOnlySpan<T> from the given StringSegment.

C#
public static implicit operator ReadOnlySpan<char>(Microsoft.Extensions.Primitives.StringSegment segment);

Parameters

segment
StringSegment

The StringSegment to convert to a ReadOnlySpan<T>.

Returns

Applies to

.NET 10 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)

Implicit(String to StringSegment)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Creates a new StringSegment from the given String.

C#
public static implicit operator Microsoft.Extensions.Primitives.StringSegment(string? value);

Parameters

value
String

The String to convert to a StringSegment.

Returns

Applies to

.NET 10 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)