AppActs.API.Model.User.AgeGroup.AgeGroup C# (CSharp) Method

AgeGroup() public method

public AgeGroup ( Nullable age ) : System
age Nullable
return System
        public AgeGroup(Nullable<int> age)
        {
            if (!age.HasValue)
                return;

            if (age <= 18)
            {
                this._1_18 += 1;
            }
            else if (age > 18 && age <= 24)
            {
                this._19_24 += 1;
            }
            else if (age > 24 && age <= 35)
            {
                this._25_35 += 1;
            }
            else if (age > 35 && age <= 50)
            {
                this._36_50 += 1;
            }
            else if (age > 50 && age <= 69)
            {
                this._51_69 += 1;
            }
            else
            {
                this._71 += 1;
            }
        }
AgeGroup