Esempio n. 1
0
 public static void ASCII(string input)
 {
     ASCIIBinary = "";
     //split string
     char[] collection = input.ToCharArray();
     //foreach char send to dictionary check
     foreach (var item in collection)
     {
         DictAsciiBinary.checkDict(Convert.ToString(item));
         //join dictionary return together
         ASCIIBinary += DictAsciiBinary.returnDICT + " ";
     }
 }
Esempio n. 2
0
        public static void AsciiToBinary(string input)
        {
            binarystring = "";
            //split string
            char[] collection = input.ToCharArray();
            //foreach char send to dictionary check
            foreach (var item in collection)
            {
                DictAsciiBinary.checkDict(Convert.ToString(item));
                //join dictionary return together
                binarystring += DictAsciiBinary.returnDICT + " ";
            }



            //send combined result back
            returnBinary = binarystring;
        }