摘要:
class program { static void main(string[] args) { calculator c = new calculator(); int r = 0; try { r = c.add("abc","100"); } catch(overflowException 閱讀全文
posted @ 2020-09-22 22:05
遙想公瑾
閱讀(152)
評論(0)
推薦(0)
摘要:
操作符里的類型轉換 一、隱式類型轉換 不丟失精度的轉換 子類向父類的轉換 裝箱 using system; namespace Conversion_Example { class Program { static void Main(string[] args) { Teacher t = new 閱讀全文
posted @ 2020-09-22 21:00
遙想公瑾
閱讀(226)
評論(0)
推薦(0)
摘要:
方法的定義、調用與調試 一、構造器 靜態構造器 不帶參數的構造器 帶參數的構造器 static void main(string[] args) { student stu = new student (2,"MR.OKAY");//傳參數滿足自定義構造器的需求 console.writeline( 閱讀全文
posted @ 2020-09-22 00:02
遙想公瑾
閱讀(248)
評論(0)
推薦(0)

浙公網安備 33010602011771號