我無法將枚舉集合發送到WCF服務方法。我用這篇文章作爲指導:Sharing Enum with WCF Service [ServiceContract]
[ServiceKnownType(typeof(MyEnum))]
[ServiceKnownType(typeof(List<MyEnum>))]
public interface IMyService{
[Operati
我使用IIS/asmx來支持Flash客戶端。我的一些服務層數據傳輸對象的屬性是枚舉值。有些情況下這些屬性應該爲空。 當與這樣的枚舉屬性空值的對象被呈現給皁,我收到此錯誤: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationExc
我有以下代碼: // Obtain the string names of all the elements within myEnum
String[] names = Enum.GetNames(typeof(myEnum));
// Obtain the values of all the elements within myEnum
Array values = Enum.GetV