Liquid XML Data Binder (C++, Java, VB6) / Examples / Simple Choice / Example Usage / Setting to many elements in a Choice / C# Sample : Simple Choice
C# Sample : Simple Choice
Schema Summary
This sample shows an element containing a choice of simple elements. One and only one child element may be provided.

Schema Details
The element AccountAdminRequest contains 3 child elements, CreateAccount, DeleteAccount and ChangeAccountPassword. Only one of these elements may be specified at a time, and one MUST be specified. All 3 of the child elements are represented in the generated code as classes (as opposed to primitive), despite being based on primitive types. This is because they all contain child attributes of there own. Elements with child elements or attributes must be represented as classes in the generated code.

Sample Description
The sample demonstrates what happens when more than one item in a choice is set.

Sample Code

 Write Sample

XSD Source Files
 SimpleChoice.xsd
 Schema Diagrams

Generated Files
 AccountAdminRequest.cs

Main Menu Samples List