Get Command line arguments from System.Environment : Command Line « Development « VB.Net






Get Command line arguments from System.Environment

  

Imports Microsoft.VisualBasic
Imports System

Public Class MainClass
   Public Shared Sub Main()
      Calculator(System.Environment.GetCommandLineArgs())
   End Sub

   Public Shared Function Calculator(args() As String) As Integer
      If args.Length < 2 Then
         Console.WriteLine("usage: TIPCALC total")
         Return 1
      End If
   End Function
End Class

   
    
  








Related examples in the same category

1.Get Command lineGet Command line
2.Deal with Command Line ArgumentsDeal with Command Line Arguments
3.Demonstrates the GetEnvironmentVariables method.
4.Set System.Environment.ExitCode