看板 C_Sharp 關於我們 聯絡資訊
請問 我要寫個計算機backspace的function int a = textBox1.Text.Length; if (textBox1.Text.Substring(0, 1) == "-") textBox1.Text = textBox1.Text.Substring(1, a); //執行後他說這行有錯 else textBox1.Text = "-" + textBox1.Text; 請問為何不能這樣用呢 ? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.119.163.250
liyata:Substring(1,a)好像是從index 1抓a長度?@@ 03/27 12:57
liyata:喔 有人回文了XD 03/27 12:57