Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [STAThread]
- static void Main(String[] args)
- {
- int argCount = args.Length;
- }
- class Program {
- [STAThread]
- static void Main(String[] args) {
- Console.WriteLine("Have {0} arguments", args.Length);
- for (int i = 0; i < args.Length; ++i) {
- Console.WriteLine("{0}: {1}", i, args[i]);
- }
- }
- }
- static class Program {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main(string[] args) {
- FormMain.Args = args;
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new FormMain());
- }
- }
- public partial class FormMain: Form {
- public static string[] Args;
- public FormMain() {
- InitializeComponent();
- }
- private void FormMain_Shown(object sender, EventArgs e) {
- foreach (string s in Args) {
- MessageBox.Show(s);
- }
- }
- }
- static class Program {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main(string[] args) {
- FormMain.Args = args;
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new FormMain());
- }
- }
- public partial class FormMain: Form {
- public static string[] Args;
- public FormMain() {
- InitializeComponent();
- }
- private void FormMain_Shown(object sender, EventArgs e) {
- foreach (string s in Args) {
- MessageBox.Show(s);
- }
- }
- }
Add Comment
Please, Sign In to add comment