二级物业在Win XP(x86)的操作系统绑定异常,但没有赢得7(64) [英] Second Level Property Binding exception on Win XP(x86) OS but not Win 7(x64)
本文介绍了二级物业在Win XP(x86)的操作系统绑定异常,但没有赢得7(64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我难倒。我有我的C#为AddressForm以下行
lkuCounty.DataBindings.Add(的EditValue,地址County.CountyID,真);
这在64位Win7的箱子,但在Win XP 32位机的伟大工程,我得到以下异常:
键入信息:System.ArgumentException
消息:无法绑定到数据源的属性或列CountyID。
参数名称:数据成员
我猜我缺少一些细微差别,并会真的AP preciate一些帮助。
下面是我的课(无构造函数),这是在一个单独的项目( myproject.Common 的)
公共类县
{
公共短? CountyID {获得;组; }
公共字符串CountyName {获得;组; }
}
公共类地址
{
公众诠释AddressID {获得;组; }
公共字符串AddressLine1 {获得;组; }
公共字符串AddressLine2 {获得;组; }
公共字符串AddressLine3 {获得;组; }
公共字符串市{获得;组; }
公共字符串邮编{获得;组; }
公共县县{获得;组; }
}
解决方案
检查拼写,例如大/小写
I am stumped. I have the following line on my c# AddressForm
lkuCounty.DataBindings.Add("EditValue", Address, "County.CountyID", true);
This works great on 64bit Win7 boxes but on Win XP 32bit machines I get the following Exception:
Type: System.ArgumentException
Message: Cannot bind to the property or column CountyID on the DataSource.
Parameter name: dataMember
I am guessing I am missing some nuance and would really appreciate some help.
Here are my classes(no constructors) which are in a seperate project (myproject.Common)
public class County
{
public short? CountyID { get; set; }
public string CountyName { get; set; }
}
public class Address
{
public int AddressID { get; set; }
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
public string AddressLine3 { get; set; }
public string City { get; set; }
public string Zip { get; set; }
public County County { get; set; }
}
解决方案
check spell e.g. upper/lower case
这篇关于二级物业在Win XP(x86)的操作系统绑定异常,但没有赢得7(64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文