SecureStringUtils.ToSecureString method

Converts a ReadOnlySpan to a SecureString.

public static SecureString ToSecureString(this ReadOnlySpan<char> span)
parameter description
span The character span to convert.

Return Value

A read-only SecureString containing the characters from the span.

Exceptions

exception condition
ArgumentException Thrown if the span is empty.

See Also