/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="c">frequency as 1 for annual, 2 for semi-annual ...</param>
        public DistributionPolicyCode(int c)
        {
            DistributionPolicyCodeAdaptee result;

            DistributionPolicyCodeAdaptee.Codes.TryGetValue(c, out result);
            if (result != null)
            {
                this.InternalObject = result;
            }
            else
            {
                throw new InvalidCastException();
            }
        }
        public override bool Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to DistributionPolicyCodeAdaptee return false.
            DistributionPolicyCodeAdaptee p = obj as DistributionPolicyCodeAdaptee;

            if ((System.Object)p == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((Value == p.Value) && (Label == p.Label));
        }
 private DistributionPolicyCode(DistributionPolicyCodeAdaptee Instance)
 {
     this.InternalObject = Instance;
 }