When encountering type "double?", we can use ".value " to get the value.
For instance:
If A is of double? type, you may get "cannot convert double? to string" when you use A.ToString() . To solve this problem, change it to A.value.ToString() .
本文介绍了解决C#中Nullable double类型转换为字符串时遇到的问题。当尝试直接使用ToString()方法时,可能会出现错误提示。文章提供了正确的解决方案:通过调用value属性来获取Nullable double类型的值。
When encountering type "double?", we can use ".value " to get the value.
For instance:
If A is of double? type, you may get "cannot convert double? to string" when you use A.ToString() . To solve this problem, change it to A.value.ToString() .

被折叠的 条评论
为什么被折叠?