Skip to content

M_Cyjb_Conversions_BaseConvert_ToString_6

CYJB edited this page Mar 20, 2024 · 13 revisions

BaseConvert.ToString 方法 (UInt32, Int32)

32 位无符号整数的值转换为其指定基的等效字符串表示形式。

Namespace: Cyjb.Conversions
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public static string ToString(
	this uint value,
	int toBase
)

参数

 

value
Type: System.UInt32
要转换的 32 位无符号整数。
toBase
Type: System.Int32
返回值的基数,必须位于 236 之间。

返回值

Type: String
toBase 为基的 value 的字符串表示形式。

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型UInt32的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。

Exceptions

 

异常 条件
ArgumentException toBase 不是 236 之间的数字。

参见

Reference

BaseConvert 类
ToString 重载
Cyjb.Conversions 命名空间

Clone this wiki locally