コード例 #1
0
 /// <summary>
 /// Returns a boolean indicating if this paygrade is a seaman.
 /// </summary>
 /// <param name="paygrade"></param>
 /// <returns></returns>
 public static bool IsSeaman(this Paygrade paygrade)
 {
     return(paygrade.IsEnlistedPaygrade() && new[] { 1, 2, 3 }.Contains(Int32.Parse(paygrade.Value.Where(char.IsNumber).First().ToString())));
 }
コード例 #2
0
 /// <summary>
 /// Returns a boolean indicating if this paygrade is a petty officer.
 /// </summary>
 /// <param name="paygrade"></param>
 /// <returns></returns>
 public static bool IsPettyOfficer(this Paygrade paygrade)
 {
     return(paygrade.IsEnlistedPaygrade() && new[] { 4, 5, 6 }.Contains(Int32.Parse(paygrade.Value.Where(char.IsNumber).First().ToString())));
 }