Quantcast
Channel: Enum accepting any string
Browsing latest articles
Browse All 6 View Live

Enum accepting any string

Ah...that clears up everything.  I didn't know about that caveat in .NET.  Thank you for the insight.

View Article



Enum 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 Article

Image may be NSFW.
Clik here to view.

Enum 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 Article

Enum 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 Article

Enum 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 Article


Enum 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
Browsing latest articles
Browse All 6 View Live




Latest Images