Exemplo n.º 1
0
        private static void TesterHollerith()
        {
            Console.WriteLine("Test fonction de transcodage Hollerith");
            int equivalent;

            Hollerith.Transcoder('Z', out equivalent);
            Console.WriteLine($"caractere : Z valeur : {equivalent}");
        }
Exemplo n.º 2
0
        private static void testerHollerith()
        {
            Console.WriteLine("Test fonction de transcodage Hollerith");
            int letter = 0x0041;

            for (int i = 0; i < 26; i++)
            {
                int  equivalent;
                char caractere = Char.Parse(char.ConvertFromUtf32(letter++));
                Hollerith.Transcoder(caractere, out equivalent);
                Console.WriteLine("caractere : {0} valeur : {1}", caractere, equivalent);
            }
            Console.ReadLine();
        }
Exemplo n.º 3
0
        /// <summary>
        /// methode pour remplacer les lettres par chiffre
        /// </summary>
        /// <param name="Numerocompte"></param>
        /// <returns></returns>
        private string remplaceCHarParNumero(string Numerocompte)
        {
            int equivalent;

            char[] charArr = Numerocompte.ToCharArray();
            for (int i = 0; i < charArr.Length; i++)
            {
                if (char.IsLetter(charArr[i]))
                {
                    Hollerith.Transcoder(charArr[i], out equivalent);
                    charArr[i] = Convert.ToChar(equivalent.ToString());
                }
            }
            string result = new string(charArr);

            return(result);
        }