RandomNumberGenerator.GetHexString 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| GetHexString(Int32, Boolean) | 创建一个用加密随机十六进制字符填充的字符串。 | 
| GetHexString(Span<Char>, Boolean) | 使用加密随机十六进制字符填充缓冲区。 | 
GetHexString(Int32, Boolean)
- Source:
- RandomNumberGenerator.cs
- Source:
- RandomNumberGenerator.cs
- Source:
- RandomNumberGenerator.cs
创建一个用加密随机十六进制字符填充的字符串。
public static string GetHexString(int stringLength, bool lowercase = false);static member GetHexString : int * bool -> stringPublic Shared Function GetHexString (stringLength As Integer, Optional lowercase As Boolean = false) As String参数
- stringLength
- Int32
要创建的字符串的长度。
- lowercase
- Boolean
              true 如果十六进制字符应为小写; false 如果它们应为大写,则为 。
默认为 false。
返回
用随机十六进制字符填充的字符串。
注解
此行为的行为与使用 GetString(ReadOnlySpan<Char>, Int32) 和指定十六进制字符作为选项相同。 此实现专门针对十六进制字符进行优化。
适用于
GetHexString(Span<Char>, Boolean)
- Source:
- RandomNumberGenerator.cs
- Source:
- RandomNumberGenerator.cs
- Source:
- RandomNumberGenerator.cs
使用加密随机十六进制字符填充缓冲区。
public static void GetHexString(Span<char> destination, bool lowercase = false);static member GetHexString : Span<char> * bool -> unitPublic Shared Sub GetHexString (destination As Span(Of Char), Optional lowercase As Boolean = false)参数
- lowercase
- Boolean
              true 如果十六进制字符应为小写; false 如果它们应为大写,则为 。
默认为 false。
注解
此行为的行为与使用 GetItems<T>(ReadOnlySpan<T>, Span<T>) 和指定十六进制字符作为选项相同。 此实现专门针对十六进制字符进行优化。