Is Flag Set In the Command Line : Environment Settings « Development Class « C# / C Sharp






Is Flag Set In the Command Line

        
using System;

namespace Util
{
  public static class Args
  {
    public static bool IsFlagSet(string flag)
    {
      return flag == Array.Find(Environment.GetCommandLineArgs(), s => s == flag);
    }
  }
}

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Environment Variables for Simple Security TasksEnvironment Variables for Simple Security Tasks
2.Get Startup path, application name and vendorGet Startup path, application name and vendor
3..NET Frameworks Overview:Accessing Environment Settings.NET Frameworks Overview:Accessing Environment Settings
4.Environment.GetEnvironmentVariable
5.Environment.ExpandEnvironmentVariables
6.Environment.GetEnvironmentVariables(EnvironmentVariableTarget.Process)
7.Environment.CommandLine, Environment.GetCommandLineArgs()
8.Environment.GetFolderPath
9.Environment.SpecialFolder
10.Environment.CommandLine
11.Environment.OSVersion
12.Environment.Version
13.Environment.UserName
14.Environment.UserDomainName
15.Environment.MachineName
16.Environment.UserInteractive
17.Environment.HasShutdownStarted
18.Environment.TickCount
19.Environment.GetLogicalDrives
20.Environment.CurrentDirectory
21.Environment.SystemDirectory
22.Is 2003 Vista Or Greater
23.Environment Class
24.Gets the command line for this process.
25.Gets or sets the fully qualified path of the current working directory.
26.Terminates this process and gives the underlying operating system the specified exit code.
27.Gets or sets the exit code of the process.
28.Replaces the name of each environment variable embedded in string
29.Immediately terminates a process after writing a message to the Windows Application event log
30.Returns a string array containing the command-line arguments for the current process.
31.Retrieves the value of an environment variable from the current process.
32.Retrieves all environment variable names and their values from the current process.
33.Gets the path to the system special folder that is identified by the specified enumeration.
34.Get the names of the logical drives on the current computer.
35.Gets the NetBIOS name of this local computer.
36.Gets the newline string defined for this environment.
37.Gets current platform identifier and version number.
38.Gets the number of processors on the current machine.
39.Gets current stack trace information.
40.Gets the fully qualified path of the system directory.
41.Gets the number of milliseconds elapsed since the system started.
42.Gets network domain name associated with the current user.
43.Is running in user interactive mode.
44.Gets user name
45.Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.
46.Gets the amount of physical memory mapped to the process context.
47.Xml based configuration
48.FindExecutable
49.Contains a listing of constants used throughout the application