Enum accepting any string
Ah...that clears up everything. I didn't know about that caveat in .NET. Thank you for the insight.
View ArticleEnum accepting any string
Hi da.3vil.coderThis is a known .net gotcha. You can set any integer to an enum. There is no validation. Try this: class Program { static void Main(string[] args) { MyEnum _x = (MyEnum)9;...
View ArticleEnum accepting any string
Want to make a small correction here. It doesn't crash on deserialization, it crashes on serialization. The InnerException message was 'Enum value '5108' is invalid for type...
View ArticleEnum accepting any string
Here is the enum: [DataContract] public enum ActionType { [EnumMember] Attorney = 1, [EnumMember] SuitAction = 2, [EnumMember] SuitDate = 3, [EnumMember] La5108 = 4 }Here is the entity that contains...
View ArticleEnum accepting any string
Hi da.3vil.coder WCF will send the a string representation of the enum value on the wire.Could you post the following:The enum code on the server, the enum code on the client (if you are not using a...
View ArticleEnum accepting any string
I have an asynchronous WCF service and was getting the following exception:An error occurred while receiving the HTTP response to http://localhost:34840/La5108Service.svc. This could be due to the...
View Article