Application Base Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides properties, methods, and events related to the current application.
public ref class ConsoleApplicationBase : Microsoft::VisualBasic::ApplicationServices::ApplicationBase
public class ConsoleApplicationBase : Microsoft.VisualBasic.ApplicationServices.ApplicationBase
type ConsoleApplicationBase = class inherit ApplicationBase
Public Class ConsoleApplicationBase Inherits ApplicationBase
This example uses the
My.Application.CommandLineArgs property to examine the application's command-line arguments. If an argument is found that starts with
/input=, the rest of that argument is displayed.
Private Sub ParseCommandLineArgs() Dim inputArgument As String = "/input=" Dim inputName As String = "" For Each s As String In My.Application.CommandLineArgs If s.ToLower.StartsWith(inputArgument) Then inputName = s.Remove(0, inputArgument.Length) End If Next If inputName = "" Then MsgBox("No input name") Else MsgBox("Input name: " & inputName) End If End Sub
The properties exposed by the
My.Application object return data that is associated only with the current application or DLL. No system-level information can be altered with
My.Application object consists of the following classes:
ApplicationBase provides members that are available in all projects.
WindowsFormsApplicationBase provides members available in Windows Forms applications.
ConsoleApplicationBase provides members available in console applications.
Initializes a new instance of the ConsoleApplicationBase class.
Gets a collection containing the command-line arguments as strings for the current application.
Gets the culture that the current thread uses for string manipulation and string formatting.(Inherited from ApplicationBase)
Gets the current application's ClickOnce deployment object, which provides support for updating the current deployment programmatically and support for the on-demand download of files.
Gets an object that provides properties for getting information about the application's assembly, such as the version number, description, and so on.(Inherited from ApplicationBase)
Sets the values to use as the current application's command-line arguments.
Gets an object that provides properties and methods for writing event and exception information to the application's log listeners.(Inherited from ApplicationBase)
Gets the culture that the current thread uses for retrieving culture-specific resources.(Inherited from ApplicationBase)
Changes the culture used by the current thread for string manipulation and for string formatting.(Inherited from ApplicationBase)
Changes the culture that the current thread uses for retrieving culture-specific resources.(Inherited from ApplicationBase)
Determines whether the specified object is equal to the current object.(Inherited from Object)
Returns the value of the specified environment variable.(Inherited from ApplicationBase)
Serves as the default hash function.(Inherited from Object)
Gets the Type of the current instance.(Inherited from Object)
Creates a shallow copy of the current Object.(Inherited from Object)
Returns a string that represents the current object.(Inherited from Object)