在我的WCF服務我有一個屬性聲明這樣的:WCF datamemberattribute外殼
public string PropertyName
{
get { return propertyName; }
set { propertyName = value; }
}
在我的客戶,當我添加服務參考服務,進口.cs
文件具有相同的屬性,但它已經失去了它的外殼,因爲這樣的:
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
public string propertyName
{
get
{
return this.propertyNameField;
}
set
{
this.propertyNameField = value;
}
}
(注意小寫p
上propertyName
)
是否有任何物品我可以這樣做,消費者實際上得到的財產與預期的箱體,即:PropertyName
,而不是propertyName
?
你好斯科特。我只是試了一下你的方法,很抱歉,但沒有奏效。 感謝您的幫助。 Steven – stevenrosscampbell 2009-05-01 17:23:28