我想用一个增加十进制的最小小数部分,例如
decimal d = 0.01
d++
d == 0.02
Run Code Online (Sandbox Code Playgroud)
要么
decimal d = 0.000012349
d++
d == 0.000012350
Run Code Online (Sandbox Code Playgroud)
我该怎么做呢?
我想通过将其转换为字符串来序列化可空的bool
public static string SerializeNullableBoolean(bool? b)
{
if (b == null)
{
return "null or -1 or .."; // What to return here?
}
else
{
return b.ToString();
}
}
Run Code Online (Sandbox Code Playgroud)
将null值序列化为最合适的字符串是什么?