UIApplication.Main UIApplication.Main Method

Definition

Overloads

Main(String[]) Main(String[])

Launches the main application loop with the given command line parameters.

Main(String[], String, String) Main(String[], String, String)

Launches the main application loop with the given command line parameters.

Main(String[], Type, Type) Main(String[], Type, Type)

Launches the main application loop with the given command line parameters.

Main(String[]) Main(String[])

Launches the main application loop with the given command line parameters.

public static void Main (string[] args);
static member Main : string[] -> unit

Parameters

args
String[]

Command line parameters from the Main program.

Remarks

This launches the main application loop, assumes that the main application class is UIApplication, and uses the UIApplicationDelegate instance specified in the main NIB file for this program.

Main(String[], String, String) Main(String[], String, String)

Launches the main application loop with the given command line parameters.

public static void Main (string[] args, string principalClassName, string delegateClassName);
static member Main : string[] * string * string -> unit

Parameters

args
String[]

Command line parameters from the Main program.

principalClassName
String String

The name of the main application class, if you specify null, this uses UIApplication.

delegateClassName
String String

The name of the UIApplicationDelegate class, if null, it uses the UIApplicationDelegate instance specified in the main NIB file for this program..

Remarks

The principalClassName is typically only specified if the application developer subclasses UIApplication, as shown in the following example:


public class Application
{
	static void Main(string[] args)
	{
		UIApplication.Main(args, "MyApp", "MyAppDelegate");
	}
}

[Register("MyApp")] public class MyApp : UIApplication { //...etc... }

[Register("MyAppDelegate")] public class AppDelegate : UIApplicationDelegate { //..etc... }

Main(String[], Type, Type) Main(String[], Type, Type)

Launches the main application loop with the given command line parameters.

public static void Main (string[] args, Type principalClass, Type delegateClass);
static member Main : string[] * Type * Type -> unit

Parameters

args
String[]

Command line parameters from the Main program.

principalClass
Type Type

The type of the main application class, if you specify null, this uses UIApplication.

delegateClass
Type Type

The type of the UIApplicationDelegate class, if null, it uses the UIApplicationDelegate instance specified in the main NIB file for this program..

Remarks

The principalClassName is typically only specified if the application developer subclasses UIApplication, as shown in the following example:


public class Application
{
  static void Main(string[] args)
  {
    UIApplication.Main(args, typeof (MyApp), typeof (MyAppDelegate));
  }
}

public class MyApp : UIApplication { //...etc... }

public class MyAppDelegate : UIApplicationDelegate { //..etc... }

Applies to