iT邦幫忙

0

看不出來哪裡錯誤

  • 分享至 

  • xImage

這個是?...不是有;了嗎?https://ithelp.ithome.com.tw/upload/images/20220616/20148351gfwVSi3cJT.jpg

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 Ticket
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            int h Convert.ToInt32(txtHight.Text);
            string ticket;
            ticket = h > 150 ? "全票" : (h > 115 ? "孩童票" : "免票");
            label2.Text = "票種 : " + ticket;
        }
    }
}
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

4
w4560000
iT邦研究生 5 級 ‧ 2022-06-16 15:25:38
最佳解答
int h Convert.ToInt32(txtHight.Text);

改成

int h = Convert.ToInt32(txtHight.Text);
orga_an21 iT邦新手 5 級 ‧ 2022-06-16 15:29:50 檢舉

居然犯這種低及錯誤 = = 感謝你

w4560000 iT邦研究生 5 級 ‧ 2022-06-16 17:24:26 檢舉

/images/emoticon/emoticon12.gif

zcm iT邦研究生 3 級 ‧ 2022-06-17 16:23:34 檢舉

居然犯這種低錯誤 = = 感謝你

居然犯這種低錯誤 = = 感謝你

連中文都犯錯....../images/emoticon/emoticon02.gif

我要發表回答

立即登入回答