public string SampleCaseStructure(EnumerationName EnumVariable)
 {
     string Output = null;
     switch (EnumVariable)
     {
         case EnumerationName.FirstElement:
             Output = "This was the first element of the enumeration.";
             break;
         case EnumerationName.NextElement:
             Output = "This was the next (middle) element of the enum.";
             break;
         case EnumerationName.LastElement:
             Output = "This was the last enum value.";
             break;
         default:
             Output = "This is an unknown value; probably a null value (or Nothing in VB).";
             break;
     }
     return Output;
 }
Ejemplo n.º 2
0
        ///--------------------------------------------------------------------------------
        /// <summary>This method determines whether or not any metadata is
        /// different between the input instance and the current instance.</summary>
        ///
        /// <param name="inputEnumeration">The enumeration to compare metadata.</param>
        ///--------------------------------------------------------------------------------
        public bool IsIdenticalMetadata(Enumeration inputEnumeration)
        {
            if (EnumerationName.GetString() != inputEnumeration.EnumerationName.GetString())
            {
                return(false);
            }
            if (ModelID.GetGuid() != inputEnumeration.ModelID.GetGuid())
            {
                return(false);
            }
            if (IsAutoUpdated.GetBool() != inputEnumeration.IsAutoUpdated.GetBool())
            {
                return(false);
            }
            if (Description.GetString() != inputEnumeration.Description.GetString())
            {
                return(false);
            }

            #region protected
            #endregion protected

            return(true);
        }