Re: [問題] 輸入參數

看板C_Sharp作者 (..)時間18年前 (2006/05/01 21:09), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《HsiaoM (A Better Man)》之銘言: : 在Console Application時 : 可以用argv, argc來引入外部參數 : 在Form的程式裡面 : 要怎麼樣引入這樣的外部參數呢? // 簡單範例 public class Form1 : System.Windows.Forms.Form { private string MyString; public Form1() { } public Form1(string str) { MyString = str; } } public class MyClass { public static void Main(string[] args) { if (args.Length != 0) Application.Run(new Form1(args[0])); else Application.Run(new Form1()); } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.58.72.70

05/01 23:31, , 1F
謝謝 我知道了 ^^
05/01 23:31, 1F
文章代碼(AID): #14LWY4gK (C_Sharp)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #14LWY4gK (C_Sharp)