static void Main()
        {
            int         step = 1;
            IntegerText c1   = new IntegerText(123456);

            for (int i = 0; i < 6; i++)
            {
                //Console.WriteLine($"{step}의 자릿수 " + c1.GetPointNumber(i));
                // 자릿수 뽑는데 메서드를 사용해도 문제는 없지만 메서드 없이 뽑고싶으면 인덱스 사용
                Console.WriteLine($"{step}의 자릿수 " + c1[i].ToString());                 // 인덱서 사용
                step *= 10;
            }
        }
Example #2
0
        static void Main()
        {
            IntegerText c1 = new IntegerText(123456);

            int step = 1;

            for (int i = 0; i < 6; i++)
            {
                //Console.WriteLine($"{step}의 자릿수" + c1.GetPointNumber(i));
                Console.WriteLine($"{step}의 자릿수" + c1[i].ToString());


                step = step * 10;
            }
        }