A value of type enum can be serialized, as long as the enum is zero-based (has a value corresponding to 0) #4345
-
Hi @rockfordlhotka, I came across this quote from ebook Using CSLA 4 Creating Business Objects, Revision: 1.1 "A value of type enum can be serialized, as long as the enum is zero-based (has a value corresponding to 0)" So I have scaffold a quick FACT to force this error but my test completed successfully. Thank you in advance, Sylvain namespace Customer
} public enum ExpenseEligibility Pending = 1,
} [Fact]
} private byte[] Serialize(object obj) private T Deserialize(byte[] data) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I have no clue about CSLA 4 but I'm using CSLA 7+ and have some enums where this restriction does not apply. So it was probably removed over the years. |
Beta Was this translation helpful? Give feedback.
-
I'm actually using CSLA 9 (R24070301)! @rockfordlhotka please let me know if you need a reviewer for any ebook/documentation updates. Cheers, Sylvain |
Beta Was this translation helpful? Give feedback.
I have no clue about CSLA 4 but I'm using CSLA 7+ and have some enums where this restriction does not apply. So it was probably removed over the years.