WindowsFormsApp1/Form1.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//异常处理
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {

        //异常处理
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //异常处理
            string text = textBox1.Text;
            try
            {
                int num = int.Parse(text);
                int b = 10;
                int c;
                c = b / num;
            }
            catch (FormatException ex) //
            {
                MessageBox.Show(ex.Message);
                throw ex;
            }
            catch (Exception ex) //
            {
                MessageBox.Show(ex.Message);
                throw ex;
            }
            finally
            {

            }
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            this.Text = Console.ReadLine();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
后面还有 8 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。