第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

private void Form1_Load中void報(bào)錯(cuò)應(yīng)該輸入什么?

private void Form1_Load中void報(bào)錯(cuò)應(yīng)該輸入什么?

C# C
慕絲7291255 2022-06-01 10:07:23
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace wordGame{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void button1_Click(object sender, System.EventArgs e){string iuputString;//定義String型變量inputString,聲明對(duì)象iuputString = new String(textBox1.Text.ToCharArray);//創(chuàng)建并初始化對(duì)象inputStringstring outputString = null;char ch;for (int i = 0; i <= inputString.length - 1; i++){if (ch == 'A' || ch == 'a' ||ch == 'E' || ch == 'e' ||ch == 'I' || ch == 'i' ||ch == 'O' || ch == 'o' ||ch == 'U' || ch == 'u'){outputString += "Egg";outputString += ch.ToString();}elseoutputString += ch.ToString();}textBox2.Text =outputString;}}private void Form1_Load(object sender, EventArgs e){}}private void Form1_Load中void報(bào)錯(cuò)應(yīng)輸入 class、delegate、enum、interface 或 struct
查看完整描述

3 回答

?
撒科打諢

TA貢獻(xiàn)1934條經(jīng)驗(yàn) 獲得超2個(gè)贊

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace wordGame

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void button1_Click(object sender, EventArgs e)

        {

            string iuputString = Convert.ToString(textBox1.Text);

            string outputString = null;

            char ch = '\0';

            for (int i = 0; i <= iuputString.Length - 1; i++)

            {

                if (ch == 'A' || ch == 'a' ||

                    ch == 'E' || ch == 'e' ||

                    ch == 'I' || ch == 'i' ||

                    ch == 'O' || ch == 'o' ||

                    ch == 'U' || ch == 'u')

                {

                    outputString += "Egg";

                    outputString += ch.ToString();

                }

                else

                {

                    ch = 'C';

                    outputString += ch.ToString();

                }

            }

            textBox2.Text = outputString;

        }

    }

}

修改后才可以正常!


查看完整回答
反對(duì) 回復(fù) 2022-06-06
?
Helenr

TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超4個(gè)贊

textBox2.Text =outputString;
}
}

去掉一個(gè)}
textBox2.Text =outputString;
}

查看完整回答
反對(duì) 回復(fù) 2022-06-06
?
青春有我

TA貢獻(xiàn)1784條經(jīng)驗(yàn) 獲得超8個(gè)贊

inputstring 打錯(cuò)啦;
inputString = new String(textBox1.Text.ToCharArray());//

查看完整回答
反對(duì) 回復(fù) 2022-06-06
  • 3 回答
  • 0 關(guān)注
  • 264 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)