コード例 #1
0
 public void Increase()
 {
     if (thisLetter != OneLetter.Z)
     {
         thisLetter++;
     }
     else
     {
         thisLetter = OneLetter.a;
     }
 }
コード例 #2
0
 public void Decrease()
 {
     if (thisLetter != OneLetter.a)
     {
         thisLetter--;
     }
     else
     {
         thisLetter = OneLetter.Z;
     }
 }
コード例 #3
0
 public void Decrease(Letter amount)
 {
     for (int i = 0; i <= (int)amount.thisLetter; i++)
     {
         if (thisLetter != OneLetter.a)
         {
             thisLetter--;
         }
         else
         {
             thisLetter = OneLetter.Z;
         }
     }
 }
コード例 #4
0
 public void Increase(Letter amount)
 {
     for (int i = 0; i <= (int)amount.thisLetter; i++)
     {
         if (thisLetter != OneLetter.Z)
         {
             thisLetter++;
         }
         else
         {
             thisLetter = OneLetter.a;
         }
     }
 }
コード例 #5
0
 public void Set(char let)
 {
     if (let > 64 && let < 91)
     {
         thisLetter = (OneLetter)((int)let - 39);
     }
     else if (let > 96 && let < 123)
     {
         thisLetter = (OneLetter)((int)let - 97);
     }
     else
     {
         throw new ArgumentOutOfRangeException();
     }
 }