 | RandomExRandomNumber 方法 |
Sweet 开发框架
生成随机数字
命名空间:
Sweet.Common
程序集:
Sweet.Common (在 Sweet.Common.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法public static string RandomNumber(
int length = 18,
bool firstcanbezero = true
)
Public Shared Function RandomNumber (
Optional length As Integer = 18,
Optional firstcanbezero As Boolean = true
) As String
static member RandomNumber :
?length : int *
?firstcanbezero : bool
(* Defaults:
let _length = defaultArg length 18
let _firstcanbezero = defaultArg firstcanbezero true
*)
-> string
参数
- length (Optional)
- 类型:SystemInt32
生成长度 - firstcanbezero (Optional)
- 类型:SystemBoolean
首字母可以为0
返回值
类型:
String结果
参见