form1.cs

来自「微软系列丛书<<C#2005从入门到精通>>」· CS 代码 · 共 38 行

CS
38
字号
#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

#endregion

namespace DoStatement
{
    partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void showSteps_Click(object sender, System.EventArgs e)
        {
            int amount = System.Int32.Parse(number.Text);

            steps.Text = "";
            string current = "";
            do
            {
                int digitCode = '0' + amount % 10;
                char digit = Convert.ToChar(digitCode);
                current = digit + current;
                steps.Text += current + "\r\n";
                amount /= 10;
            }
            while (amount != 0);
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?