价值''无法转换 [英] Value '' cannot be converted
本文介绍了价值''无法转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个DatePicker控件。我总是得到错误
价值''无法转换
我设置
TargetNullValue = ''
。不工作
我尝试过:
我设置< pre> TargetNullValue =''
。不工作
解决方案
''不是一个值:它是一个字符文字,里面没有字符。有点像没有杯子说一杯咖啡!
你需要在引号内加一个字符说明符,这可能会插入一个空字符 (与空值不同):
TargetNullValue ='\ 0'
I添加了一个属性然后错误就消失了。
{FallbackValue = ' ',TargetNullValue = ' '}
I have a DatePicker control. I always get the error
Value '' cannot be converted
I set
TargetNullValue=''
. Not working
What I have tried:
I set <pre>TargetNullValue=''
. Not working
解决方案
'' is not a value: it's a "character literal" without a character inside it. A bit like saying "a cup of coffee" without the cup!
You need a character specifier inside the quotes, like this perhaps which may insert a "null character" (not the same as a null value):
TargetNullValue = '\0'
I added one more property then the error is gone.
{FallbackValue='',TargetNullValue=''}
这篇关于价值''无法转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文