BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object

Provides the current settings for, and information about, the execution environment.

Use this class to retrieve the following information:

Command line arguments
Exit codes
Environment variable settings
Contents of the call stack
Time since last system boot
Version of the execution engine
- Property
  System.String

  Gets the information entered on the command line when the current process was started.

  A containing the command line arguments.

  This property is read-only.

  This property provides access to the program name and any arguments specified on the command line when the current process was started.

  If the environment does not support a program name, as can be the case with compact devices, then the program name is equal to .

  The format of the information returned by this property is implementation-specific.

  The program name can, but is not required to, include path information.

  Use the method to retrieve the command line information parsed and stored in an array of strings.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String The full path of the current working directory of the process. A containing the full current working directory path. This property is for getting or setting the current working directory of the process. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void `` A value that is provided to the operating system.

  Terminates the current process and sets the process exit code to the specified value.

  This method causes an executing program to halt.

  The immediate caller does not have the required permission. Requires permission to read environment variables. See . Requires unmanaged code permission. See . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32 0

  Gets or sets the exit code of a process.

  A value returned by a process. The default value is zero.

  When a process exits, if the process does not return a value, the value of is returned. If the value of this property is not set by an application, zero is returned.

  On operating systems that do not support process exit codes, CLI implementations are required to fully support getting and setting values for this property.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` The string containing 0 or more environment variable references (like %HOME%). Expands all the environment variable references in the given string with the value of the environment variable. To be added. In the given string parameter, the reference to the environment variable is written in Windows style, e.g.

  %HOME%

  Note that the expansion only takes place if the environment variable is set. If it's not set, the reference is printed as is. `using System; class SystemDemo { public static void Main(string[] args) { Console.WriteLine(Environment.ExpandEnvironmentVariables("This app is running under the display %DISPLAY%")); } }` prints

  This app is running under the display :0.0

  when running on the :0 display on Linux. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Void `` To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  4.0.0.0
  System.Security.SecurityCritical
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  System.String[]

  Returns the arguments specified on the command line.

  Returns a array. Each in the array contains a single command line argument.

  The first element in the array contains the filename of the executing program. If the filename is not available, the first element is equal to . The remaining elements contain any additional tokens entered on the command line.

  The program filename can, but is not required to, include path information.

  To obtain the command line as a single , use the property.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` A containing the name of an environment variable.

  Returns the value of the specified environment variable.

  A containing the current setting of , or .

  If contains a valid name for an environment variable, and if the caller has sufficient permissions, this method returns the current setting for . Environment variable names are case-insensitive.

  If specifies an invalid name or the system does not support environment variables, this method returns .

  To obtain names and settings for all environment variables, use the method.

  is a null reference. The caller does not have the required permission. Requires permission to read environment variables. See . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Collections.IDictionary

  Returns all environment variables and their current settings.

  A object containing environment variable names and settings, or if the system does not support environment variables.

  The names and settings for the environment variables are stored in the returned object as keys and values, respectively.

  To obtain the setting of a single environment variable, use the method.

  The caller does not have the required permission. Requires permission to read environment variables. See .

  The following example prints the names and values of all environment variables defined in the environment.

  `using System; using System.Collections; class EnvTest:Object { public static void Main() { Console.WriteLine("Environment Variables"); IDictionary envars = Environment.GetEnvironmentVariables(); IDictionaryEnumerator varEnumerator = envars.GetEnumerator(); while(varEnumerator.MoveNext() != false) { Console.WriteLine("{0}={1}", varEnumerator.Key, varEnumerator.Value); } } }`

  The output will vary depending on your system.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Collections.IDictionary `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String `` The special folder whose path is to be returned. Returns the path on the file system corresponding to the special folder. The path to the special folder, or the empty string if the special folder is not available or not applicable in the running operating system. See for a list of special folders and their locations on non-Windows operating systems. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  4.0.0.0
  System.String `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  System.String[] To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean

  Gets a value indicating whether an application has started to shut down.

  A where indicates the shutdown process has started; otherwise .

  This property is read-only.

  This property is for use inside the finalizer of an application. If the shutdown process has started, static members should not be accessed; they might have been cleaned up by the garbage collector. If the member has been cleaned up, any access attempt will cause an exception to be thrown.

  is a special case that is always available after the shutdown process has started.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  4.0.0.0
  System.Boolean To be added. To be added. To be added.
- Property
  4.0.0.0
  System.Boolean To be added. To be added. To be added.
- Property
  System.String ReadOnly property for getting the machine name of the computer. The machine name of the computer the application is running on. The information in the is dependent on the underlying operating system.
  On Linux, this returns the value of the HOSTNAME environment variable.
  On Windows, this returns the NETBIOS machine name of the computer.
  `using System; class SystemDemo { public static void Main(string[] args) { Console.WriteLine(Environment.MachineName); } }` Executing this program on a linux machine returns a name like "machinename.example.com", while on Windows, it'll show a name like "MACHINENAME". 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String

  Gets the newline string for the current platform.

  A containing the characters required to write a newline.

  This property is read-only.

  This property is intended for platform-independent formatting of multi-line strings. This value is automatically appended to text when using methods, such as .

  The following example demonstrates using the property. The string returned by is inserted between "Hello" and "World", causing a line break between the words in the output.

  `using System; class TestClass { public static void Main() { Console.WriteLine("Hello,{0}World", Environment.NewLine); } }`

  The output is

  Hello,

  World

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.OperatingSystem Returns a object that contains details about the current execution platform. A object representing the current platform. `using System; class SystemDemo { public static void Main(string[] args) { Console.WriteLine(Environment.OSVersion); } }` prints

  Unix 2.6.6.1

  on a Linux installation with the 2.6.6.1 kernel. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Int32 To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Void `` `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Void `` `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Property
  System.String

  Returns a string representation of the state of the call stack.

  A containing a description of the methods currently in the call stack. This value can be .

  This property is read-only.

  An example of how the returned by this property might be formatted follows, where one line of information is provided for each method on the call stack:

  at .() in :line

  , , , , and are defined as follows:

  Item
  Description
  The fully qualified name of the class.
  The name of the method.
  The list of parameter type/name pairs. Each pair is separated by a comma (,). This information is omitted if takes zero parameters.
  The name of the source file where the method is declared. This information is omitted if debug symbols are not available.
  The number of the line in that contains the source code from for the instruction that is on the call stack. This information is omitted if debug symbols are not available.

  The literal "at" is preceded by a single space.

  The literals "in" and ":line" are omitted if debug symbols are not available.

  The method calls are described in reverse chronological order (the most recent method call is described first).

  might not report as many method calls as expected, due to code transformations that occur during optimization.

  The following example gets the property from within a series of nested calls.

  `using System; public class TestCallStack { public void MyMethod1 () { MyMethod2(); } public void MyMethod2 () { MyMethod3(); } public void MyMethod3 () { Console.WriteLine("TestCallStack: {0}", Environment.StackTrace); } public static void Main() { TestCallStack t = new TestCallStack(); t.MyMethod1(); } }`

  Without debug symbols the output is

  TestCallStack: at System.Environment.GetStackTrace(Exception e)

  at System.Environment.GetStackTrace(Exception e)

  at System.Environment.get_StackTrace()

  at TestCallStack.Main()

  With debug symbols the output is

  TestCallStack: at System.Environment.GetStackTrace(Exception e)

  at System.Environment.GetStackTrace(Exception e)

  at System.Environment.get_StackTrace()

  at TestCallStack.MyMethod3() in c:\ECMAExamples\envstack.cs:line 10

  at TestCallStack.MyMethod2() in c:\ECMAExamples\envstack.cs:line 8

  at TestCallStack.MyMethod1() in c:\ECMAExamples\envstack.cs:line 5

  at TestCallStack.Main() in c:\ECMAExamples\envstack.cs:line 15

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String Returns the 'System' directory for the Operating System. The full path to the 'System' directory. This returns the System Folder for the Operating System. This is dependent on the Operating System.
  On Windows: it returns the Windows System folder (e.g. C:\WinNT\System32).
  On Non-Windows systems: It returns a blank string ("").
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  4.0.0.0
  System.Int32 To be added. To be added. To be added.
- Property
  System.Int32 496190500

  Gets the number of milliseconds elapsed since the system was started.

  A value containing the amount of time in milliseconds that has passed since the last time the computer was started.

  This property is read-only.

  The resolution of the property cannot be less than 500 milliseconds.

  The value of this property is derived from the system timer.

  The property handles an overflow condition by resetting its value to zero. The minimum value returned by is 0.

  is measured in milliseconds, not in "ticks".

  The reaches its maximum value after approximately 24.8 days of continuous up time.

  For applications that require a finer granularity or a larger maximum time than supports, see

  .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.String Returns the domain name of the currently user. Domain name of the current user. This returns the same value as on mono. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.String Returns the user name the current process is running under. The username of the account the current process is running under. This property identifies the username under which the current process is executing. 1.0.5000.0 2.0.0.0 4.0.0.0
- Property
  System.Version

  Gets the current version of the execution engine.

  A object that contains the major, minor, build, and revision numbers of the execution engine.

  This property is read-only.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int64 To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)