vol*_*ody 2 vb.net formatting conditional string-formatting
有没有办法使用字符串格式化器将布尔类型转换为"ON"/"OFF",如:
Dim inpValue as Boolean
Dim outValue = String.Format("0:ON;OFF", inpValue)
' should show OFF as output
Run Code Online (Sandbox Code Playgroud)
没有代码或IFormatProvider?
出什么问题了:
Dim inpValue as Boolean
Dim outValue = If(inpValue, "ON", "OFF")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4426 次 |
| 最近记录: |