M_Cyjb_Conversions_BaseConvert_ToString - CYJB/Cyjb GitHub Wiki
将 8
位无符号整数的值转换为其指定基的等效字符串表示形式。
Namespace: Cyjb.Conversions
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public static string ToString(
this byte value,
int toBase
)
- value
- Type: System.Byte
要转换的8
位无符号整数。 - toBase
- Type: System.Int32
返回值的基数,必须位于2
到36
之间。
Type: String
以 toBase 为基的 value 的字符串表示形式。
在 Visual Basic 和 C# 中,这个方法可以当成为类型Byte的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic) 或 扩展方法 (C# 编程指南) 获取更多信息。
异常 | 条件 |
---|---|
ArgumentException |
toBase 不是 2 到 36 之间的数字。 |