AsSpan
public ReadOnlySpan<byte> AsSpan() Returns a span representation of this instance.
Returns
A span representation of this instance.
public ReadOnlySpan<byte> AsSpan()public int CompareTo(IdSpan other)otherIdSpan| Value | Meaning |
|---|---|
| Less than zero | This instance precedes other in the sort order. |
| Zero | This instance occurs in the same position in the sort order as other. |
| Greater than zero | This instance follows other in the sort order. |
public static IdSpan Create(string id)IdSpan instance from the provided value. idstringIdSpan corresponding to the provided id. public bool Equals(IdSpan obj)objIdSpantrue if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object? obj)objobject?true if obj and this instance are the same type and represent the same value; otherwise, false.public override int GetHashCode()public void GetObjectData(SerializationInfo info, StreamingContext context)System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.infoSerializationInfoSystem.Runtime.Serialization.SerializationInfo to populate with data.contextStreamingContextSystem.Runtime.Serialization.StreamingContext) for this serialization.System.Security.SecurityExceptionpublic uint GetUniformHashCode()IdSpan. public override string ToString()public bool TryFormat(Span<char> destination, out int charsWritten)destinationSpan<char>charsWrittenintpublic static IdSpan UnsafeCreate(byte[]? value, int hashCode)valuebyte[]?hashCodeintIdSpan instance. public static byte[]? UnsafeGetArray(IdSpan id)idIdSpanpublic static bool operator ==(IdSpan left, IdSpan right)leftIdSpanrightIdSpantrue if the provided values are equal, otherwise false.public static bool operator !=(IdSpan left, IdSpan right)leftIdSpanrightIdSpantrue if the provided values are not equal, otherwise false.