BExIS.Xml.Helpers.XmlSchemaUtility.IsChoiceType C# (CSharp) Method

IsChoiceType() public static method

return true if a Element is a Choice
public static IsChoiceType ( XmlSchemaComplexType complexType ) : bool
complexType System.Xml.Schema.XmlSchemaComplexType
return bool
        public static bool IsChoiceType(XmlSchemaComplexType complexType)
        {
            if (complexType != null)
            {
                #region choice
                // check if it is e choice
                XmlSchemaChoice choice = complexType.ContentTypeParticle as XmlSchemaChoice;
                if (choice != null)
                {
                    return true;
                }
                #endregion
            }

            return false;
        }

Same methods

XmlSchemaUtility::IsChoiceType ( XmlSchemaElement element ) : bool