diff --git a/snippets/fsharp/System/Environment+SpecialFolder/Overview/fs.fsproj b/snippets/fsharp/System/Environment+SpecialFolder/Overview/fs.fsproj
new file mode 100644
index 00000000000..bdd97233038
--- /dev/null
+++ b/snippets/fsharp/System/Environment+SpecialFolder/Overview/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment+SpecialFolder/Overview/getfolderpath.fs b/snippets/fsharp/System/Environment+SpecialFolder/Overview/getfolderpath.fs
new file mode 100644
index 00000000000..6a182869cf8
--- /dev/null
+++ b/snippets/fsharp/System/Environment+SpecialFolder/Overview/getfolderpath.fs
@@ -0,0 +1,9 @@
+//
+// Sample for the Environment.GetFolderPath method
+open System
+
+printfn $"\nGetFolderPath: {Environment.GetFolderPath Environment.SpecialFolder.System}"
+
+// This example produces the following results:
+// GetFolderPath: C:\WINNT\System32
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/CommandLine/commandline.fs b/snippets/fsharp/System/Environment/CommandLine/commandline.fs
new file mode 100644
index 00000000000..02bd06f8fc0
--- /dev/null
+++ b/snippets/fsharp/System/Environment/CommandLine/commandline.fs
@@ -0,0 +1,10 @@
+//
+open System
+
+// Invoke this sample with an arbitrary set of command line arguments.
+printfn $"\nCommandLine: {Environment.CommandLine}"
+// The example displays output like the following:
+// C:\>env0 ARBITRARY TEXT
+//
+// CommandLine: env0 ARBITRARY TEXT
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/CommandLine/fs.fsproj b/snippets/fsharp/System/Environment/CommandLine/fs.fsproj
new file mode 100644
index 00000000000..ca80945f78b
--- /dev/null
+++ b/snippets/fsharp/System/Environment/CommandLine/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/CurrentDirectory/Vars1.fs b/snippets/fsharp/System/Environment/CurrentDirectory/Vars1.fs
new file mode 100644
index 00000000000..ea01a58a01c
--- /dev/null
+++ b/snippets/fsharp/System/Environment/CurrentDirectory/Vars1.fs
@@ -0,0 +1,18 @@
+//
+open System
+open System.IO
+
+if Environment.OSVersion.Platform = PlatformID.Win32NT then
+ // Change the directory to %WINDIR%
+ Environment.CurrentDirectory <- Environment.GetEnvironmentVariable "windir"
+
+ let info = DirectoryInfo "."
+
+ printfn $"Directory Info: {info.FullName}"
+else
+ printfn "This example runs on Windows only."
+// The example displays output like the following on a .NET implementation running on Windows:
+// Directory Info: C:\windows
+// The example displays the following output on a .NET implementation on Unix-based systems:
+// This example runs on Windows only.
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/CurrentDirectory/fs.fsproj b/snippets/fsharp/System/Environment/CurrentDirectory/fs.fsproj
new file mode 100644
index 00000000000..04bc1d3baaf
--- /dev/null
+++ b/snippets/fsharp/System/Environment/CurrentDirectory/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ExitCode/double.fs b/snippets/fsharp/System/Environment/ExitCode/double.fs
new file mode 100644
index 00000000000..aa78dc5f536
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ExitCode/double.fs
@@ -0,0 +1,23 @@
+module double
+
+//
+open System
+open System.Numerics
+
+let ERROR_BAD_ARGUMENTS = 0xA0
+let ERROR_ARITHMETIC_OVERFLOW = 0x216
+let ERROR_INVALID_COMMAND_LINE = 0x667
+
+let args = Environment.GetCommandLineArgs()
+if args.Length = 1 then
+ Environment.ExitCode <- ERROR_INVALID_COMMAND_LINE
+else
+ match BigInteger.TryParse args[1] with
+ | true, value ->
+ if value <= bigint Int32.MinValue || value >= bigint Int32.MaxValue then
+ Environment.ExitCode <- ERROR_ARITHMETIC_OVERFLOW
+ else
+ printfn $"Result: {value * 2I}"
+ | _ ->
+ Environment.ExitCode <- ERROR_BAD_ARGUMENTS
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ExitCode/double1.fs b/snippets/fsharp/System/Environment/ExitCode/double1.fs
new file mode 100644
index 00000000000..7578efef4df
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ExitCode/double1.fs
@@ -0,0 +1,27 @@
+module double1
+
+//
+open System
+open System.Numerics
+
+let ERROR_SUCCESS = 0
+let ERROR_BAD_ARGUMENTS = 0xA0
+let ERROR_ARITHMETIC_OVERFLOW = 0x216
+let ERROR_INVALID_COMMAND_LINE = 0x667
+
+[]
+let main _ =
+ let args = Environment.GetCommandLineArgs()
+ if args.Length = 1 then
+ ERROR_INVALID_COMMAND_LINE
+ else
+ match BigInteger.TryParse args[1] with
+ | true, value ->
+ if value <= bigint Int32.MinValue || value >= bigint Int32.MaxValue then
+ ERROR_ARITHMETIC_OVERFLOW
+ else
+ printfn $"Result: {value * 2I}"
+ ERROR_SUCCESS
+ | _ ->
+ ERROR_BAD_ARGUMENTS
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ExitCode/fs.fsproj b/snippets/fsharp/System/Environment/ExitCode/fs.fsproj
new file mode 100644
index 00000000000..a0ef496830e
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ExitCode/fs.fsproj
@@ -0,0 +1,11 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/expandenvironmentvariables.fs b/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/expandenvironmentvariables.fs
new file mode 100644
index 00000000000..6c45ad0bf74
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/expandenvironmentvariables.fs
@@ -0,0 +1,15 @@
+//
+// Sample for the Environment.ExpandEnvironmentVariables method
+open System
+
+let nl = Environment.NewLine
+
+// <-- Keep this information secure! -->
+let query = "My system drive is %SystemDrive% and my system root is %SystemRoot%"
+let str = Environment.ExpandEnvironmentVariables query
+printfn $"\nExpandEnvironmentVariables: {nl} {str}"
+
+// This example produces the following results:
+// ExpandEnvironmentVariables:
+// My system drive is C: and my system root is C:\WINNT
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/fs.fsproj b/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/fs.fsproj
new file mode 100644
index 00000000000..c699d29b3ac
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/FailFast/ff.fs b/snippets/fsharp/System/Environment/FailFast/ff.fs
new file mode 100644
index 00000000000..b9316373a67
--- /dev/null
+++ b/snippets/fsharp/System/Environment/FailFast/ff.fs
@@ -0,0 +1,18 @@
+//
+open System
+
+let causeOfFailure = "A catastrophic failure has occurred."
+
+// Assume your application has failed catastrophically and must
+// terminate immediately. The try-finally block is not executed
+// and is included only to demonstrate that instructions within
+// try-catch blocks and finalizers are not performed.
+try
+ Environment.FailFast causeOfFailure
+finally
+ printfn "This finally block will not be executed."
+
+// The example produces no output because the application is terminated.
+// However, an entry is made in the Windows Application event log, and
+// the log entry contains the text from the causeOfFailure variable.
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/FailFast/fs.fsproj b/snippets/fsharp/System/Environment/FailFast/fs.fsproj
new file mode 100644
index 00000000000..8958f502939
--- /dev/null
+++ b/snippets/fsharp/System/Environment/FailFast/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetCommandLineArgs/fs.fsproj b/snippets/fsharp/System/Environment/GetCommandLineArgs/fs.fsproj
new file mode 100644
index 00000000000..35970dd43d3
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetCommandLineArgs/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetCommandLineArgs/getcommandlineargs.fs b/snippets/fsharp/System/Environment/GetCommandLineArgs/getcommandlineargs.fs
new file mode 100644
index 00000000000..fa586dea9a5
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetCommandLineArgs/getcommandlineargs.fs
@@ -0,0 +1,14 @@
+//
+open System
+
+// Invoke this sample with an arbitrary set of command line arguments.
+let arguments = Environment.GetCommandLineArgs()
+
+String.concat ", " arguments
+|> printfn "\nGetCommandLineArgs: %s"
+
+// This example produces output like the following:
+// C:\>GetCommandLineArgs ARBITRARY TEXT
+//
+// GetCommandLineArgs: GetCommandLineArgs, ARBITRARY, TEXT
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetEnvironmentVariable/fs.fsproj b/snippets/fsharp/System/Environment/GetEnvironmentVariable/fs.fsproj
new file mode 100644
index 00000000000..bc7958b177e
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetEnvironmentVariable/fs.fsproj
@@ -0,0 +1,11 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.fs b/snippets/fsharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.fs
new file mode 100644
index 00000000000..636fddb57a7
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.fs
@@ -0,0 +1,49 @@
+module Example
+
+open System
+
+let mutable toDelete = false
+
+// Check whether the environment variable exists.
+let value =
+ let v = Environment.GetEnvironmentVariable "Test1"
+ // If necessary, create it.
+ if isNull v then
+ Environment.SetEnvironmentVariable("Test1", "Value1")
+ toDelete <- true
+ Environment.GetEnvironmentVariable "Test1"
+ else
+ v
+
+// Display the value.
+printfn $"Test1: {value}\n"
+
+// Confirm that the value can only be retrieved from the process
+// environment block if running on a Windows system.
+if Environment.OSVersion.Platform = PlatformID.Win32NT then
+ printfn "Attempting to retrieve Test1 from:"
+ for enumValue in Enum.GetValues typeof do
+ let value = Environment.GetEnvironmentVariable("Test1", enumValue :?> EnvironmentVariableTarget)
+ printfn $""" {enumValue}: {if value <> null then "found" else "not found"}"""
+ printfn ""
+
+// If we've created it, now delete it.
+if toDelete then
+ Environment.SetEnvironmentVariable("Test1", null)
+ // Confirm the deletion.
+ if Environment.GetEnvironmentVariable "Test1" |> isNull then
+ printfn "Test1 has been deleted."
+// The example displays the following output if run on a Windows system:
+// Test1: Value1
+//
+// Attempting to retrieve Test1 from:
+// Process: found
+// User: not found
+// Machine: not found
+//
+// Test1 has been deleted.
+//
+// The example displays the following output if run on a Unix-based system:
+// Test1: Value1
+//
+// Test1 has been deleted.
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs b/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs
new file mode 100644
index 00000000000..f5b7492c39b
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs
@@ -0,0 +1,135 @@
+module Sample
+
+open System
+
+// Environment variable names for default, process, user, and machine targets.
+let rec defaultEnvVar = nameof defaultEnvVar
+let rec processEnvVar = nameof processEnvVar
+let rec userEnvVar = nameof userEnvVar
+let rec machineEnvVar = nameof machineEnvVar
+
+let rec dft = nameof dft
+let rec proc = nameof proc
+let rec user = nameof user
+let rec machine = nameof machine
+
+// Set the environment variable for each target.
+printfn "Setting environment variables for each target...\n"
+// The default target (the current process).
+Environment.SetEnvironmentVariable(defaultEnvVar, dft)
+// The current process.
+Environment.SetEnvironmentVariable(processEnvVar, proc, EnvironmentVariableTarget.Process)
+// The current user.
+Environment.SetEnvironmentVariable(userEnvVar, user, EnvironmentVariableTarget.User)
+// The local machine.
+Environment.SetEnvironmentVariable(machineEnvVar, machine, EnvironmentVariableTarget.Machine)
+
+// Define a list of environment variables.
+let envVars = [ defaultEnvVar; processEnvVar; userEnvVar; machineEnvVar ]
+
+// Try to get the environment variables from each target.
+// The default (no specified target).
+printfn "Retrieving environment variables from the default target:"
+for envVar in envVars do
+ let value =
+ match Environment.GetEnvironmentVariable envVar with
+ | null -> "(none)"
+ | v -> v
+ printfn $" {envVar}: {value}"
+
+// The process block.
+printfn "\nRetrieving environment variables from the Process target:"
+for envVar in envVars do
+ let value =
+ match Environment.GetEnvironmentVariable(envVar, EnvironmentVariableTarget.Process) with
+ | null -> "(none)"
+ | v -> v
+ printfn $" {envVar}: {value}"
+
+// The user block.
+printfn "\nRetrieving environment variables from the User target:"
+for envVar in envVars do
+ let value =
+ match Environment.GetEnvironmentVariable(envVar, EnvironmentVariableTarget.User) with
+ | null -> "(none)"
+ | v -> v
+ printfn $" {envVar}: {value}"
+
+// The machine block.
+printfn "\nRetrieving environment variables from the Machine target:"
+for envVar in envVars do
+ let value =
+ match Environment.GetEnvironmentVariable(envVar, EnvironmentVariableTarget.Machine) with
+ | null -> "(none)"
+ | v -> v
+ printfn $" {envVar}: {value}"
+
+// Delete the environment variable for each target.
+printfn "\nDeleting environment variables for each target...\n"
+// The default target (the current process).
+Environment.SetEnvironmentVariable(defaultEnvVar, null)
+// The current process.
+Environment.SetEnvironmentVariable(processEnvVar, null, EnvironmentVariableTarget.Process)
+// The current user.
+Environment.SetEnvironmentVariable(userEnvVar, null, EnvironmentVariableTarget.User)
+// The local machine.
+Environment.SetEnvironmentVariable(machineEnvVar, null, EnvironmentVariableTarget.Machine)
+
+// The example displays the following output if run on a Windows system:
+// Setting environment variables for each target...
+//
+// Retrieving environment variables from the default target:
+// defaultEnvVar: dft
+// processEnvVar: process
+// userEnvVar: user
+// machineEnvVar: (none)
+//
+// Retrieving environment variables from the Process target:
+// defaultEnvVar: dft
+// processEnvVar: process
+// userEnvVar: user
+// machineEnvVar: (none)
+//
+// Retrieving environment variables from the User target:
+// defaultEnvVar: (none)
+// processEnvVar: (none)
+// userEnvVar: user
+// machineEnvVar: (none)
+//
+// Retrieving environment variables from the Machine target:
+// defaultEnvVar: (none)
+// processEnvVar: (none)
+// userEnvVar: (none)
+// machineEnvVar: machine
+//
+// Deleting environment variables for each target...
+//
+// The example displays the following output if run on a Unix-based system:
+//
+// Setting environment variables for each target...
+//
+// Retrieving environment variables from the default target:
+// defaultEnvVar: dft
+// processEnvVar: process
+// userEnvVar: (none)
+// machineEnvVar: (none)
+//
+// Retrieving environment variables from the Process target:
+// defaultEnvVar: dft
+// processEnvVar: process
+// userEnvVar: (none)
+// machineEnvVar: (none)
+//
+// Retrieving environment variables from the User target:
+// defaultEnvVar: (none)
+// processEnvVar: (none)
+// userEnvVar: (none)
+// machineEnvVar: (none)
+//
+// Retrieving environment variables from the Machine target:
+// defaultEnvVar: (none)
+// processEnvVar: (none)
+// userEnvVar: (none)
+// machineEnvVar: (none)
+//
+// Deleting environment variables for each target...
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetEnvironmentVariables/fs.fsproj b/snippets/fsharp/System/Environment/GetEnvironmentVariables/fs.fsproj
new file mode 100644
index 00000000000..ea4a01e687f
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetEnvironmentVariables/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetEnvironmentVariables/getenvironmentvariables.fs b/snippets/fsharp/System/Environment/GetEnvironmentVariables/getenvironmentvariables.fs
new file mode 100644
index 00000000000..8ea79afd176
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetEnvironmentVariables/getenvironmentvariables.fs
@@ -0,0 +1,14 @@
+//
+// Sample for the Environment.GetEnvironmentVariables method
+open System
+open System.Collections
+
+printfn "\nGetEnvironmentVariables: "
+for de in Environment.GetEnvironmentVariables() do
+ let de = de :?> DictionaryEntry
+ printfn $" {de.Key} = {de.Value}"
+// Output from the example is not shown, since it is:
+// Lengthy.
+// Specific to the machine on which the example is run.
+// May reveal information that should remain secure.
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetLogicalDrives/fs.fsproj b/snippets/fsharp/System/Environment/GetLogicalDrives/fs.fsproj
new file mode 100644
index 00000000000..e4c58a4e145
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetLogicalDrives/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/GetLogicalDrives/getlogicaldrives.fs b/snippets/fsharp/System/Environment/GetLogicalDrives/getlogicaldrives.fs
new file mode 100644
index 00000000000..4f422dcd9b9
--- /dev/null
+++ b/snippets/fsharp/System/Environment/GetLogicalDrives/getlogicaldrives.fs
@@ -0,0 +1,11 @@
+//
+// Sample for the Environment.GetLogicalDrives method
+open System
+
+let drives = Environment.GetLogicalDrives()
+
+String.concat ", " drives
+|> printfn "\nGetLogicalDrives: %s"
+// This example produces the following results:
+// GetLogicalDrives: A:\, C:\, D:\
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/MachineName/fs.fsproj b/snippets/fsharp/System/Environment/MachineName/fs.fsproj
new file mode 100644
index 00000000000..a49b09d8d2f
--- /dev/null
+++ b/snippets/fsharp/System/Environment/MachineName/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/MachineName/machinename.fs b/snippets/fsharp/System/Environment/MachineName/machinename.fs
new file mode 100644
index 00000000000..b6476253d5f
--- /dev/null
+++ b/snippets/fsharp/System/Environment/MachineName/machinename.fs
@@ -0,0 +1,12 @@
+//
+// Sample for the Environment.MachineName property
+open System
+
+// <-- Keep this information secure! -->
+printfn $"\nMachineName: {Environment.MachineName}"
+
+// This example produces the following results:
+// (Any result that is lengthy, specific to the machine on which this sample was tested, or reveals information that should remain secure, has been omitted and marked "!---OMITTED---!".)
+//
+// MachineName: !---OMITTED---!
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/NewLine/fs.fsproj b/snippets/fsharp/System/Environment/NewLine/fs.fsproj
new file mode 100644
index 00000000000..0063ecd32d1
--- /dev/null
+++ b/snippets/fsharp/System/Environment/NewLine/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/NewLine/newline.fs b/snippets/fsharp/System/Environment/NewLine/newline.fs
new file mode 100644
index 00000000000..42e4d6f8088
--- /dev/null
+++ b/snippets/fsharp/System/Environment/NewLine/newline.fs
@@ -0,0 +1,11 @@
+//
+// Sample for the Environment.NewLine property
+open System
+
+printfn $"\nNewLine: {Environment.NewLine} first line{Environment.NewLine} second line"
+
+// This example produces the following results:
+// NewLine:
+// first line
+// second line
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/Overview/env0.fs b/snippets/fsharp/System/Environment/Overview/env0.fs
new file mode 100644
index 00000000000..20b359781f4
--- /dev/null
+++ b/snippets/fsharp/System/Environment/Overview/env0.fs
@@ -0,0 +1,109 @@
+//
+// Sample for Environment class summary
+open System
+open System.Collections
+
+let nl = Environment.NewLine
+
+printfn ""
+printfn "-- Environment members --"
+
+// Invoke this sample with an arbitrary set of command line arguments.
+printfn $"CommandLine: {Environment.CommandLine}"
+
+Environment.GetCommandLineArgs()
+|> String.concat ", "
+|> printfn "GetCommandLineArgs: %s"
+
+// <-- Keep this information secure! -->
+printfn $"CurrentDirectory: {Environment.CurrentDirectory}"
+
+printfn $"ExitCode: {Environment.ExitCode}"
+
+printfn $"HasShutdownStarted: {Environment.HasShutdownStarted}"
+
+// <-- Keep this information secure! -->
+printfn $"MachineName: {Environment.MachineName}"
+
+printfn $"NewLine: {nl} first line{nl} second line{nl} third line"
+
+printfn $"OSVersion: {Environment.OSVersion}"
+
+printfn $"StackTrace: '{Environment.StackTrace}'"
+
+// <-- Keep this information secure! -->
+printfn $"SystemDirectory: {Environment.SystemDirectory}"
+
+printfn $"TickCount: {Environment.TickCount}"
+
+// <-- Keep this information secure! -->
+printfn $"UserDomainName: {Environment.UserDomainName}"
+
+printfn $"UserInteractive: {Environment.UserInteractive}"
+
+// <-- Keep this information secure! -->
+printfn $"UserName: {Environment.UserName}"
+
+printfn $"Version: {Environment.Version}"
+
+printfn $"WorkingSet: {Environment.WorkingSet}"
+
+// No example for Exit(exitCode) because doing so would terminate this example.
+
+// <-- Keep this information secure! -->
+let query = "My system drive is %SystemDrive% and my system root is %SystemRoot%"
+let str = Environment.ExpandEnvironmentVariables query
+printfn $"ExpandEnvironmentVariables: {nl} {str}"
+
+printfn $"""GetEnvironmentVariable: {nl} My temporary directory is {Environment.GetEnvironmentVariable "TEMP"}."""
+
+printfn "GetEnvironmentVariables: "
+let environmentVariables = Environment.GetEnvironmentVariables()
+for de in environmentVariables do
+ let de = de :?> DictionaryEntry
+ printfn $" {de.Key} = {de.Value}"
+
+printfn $"GetFolderPath: {Environment.GetFolderPath Environment.SpecialFolder.System}"
+
+Environment.GetLogicalDrives()
+|> String.concat ", "
+|> printfn "GetLogicalDrives: %s"
+
+// This example produces results similar to the following:
+// (Any result that is lengthy or reveals information that should remain
+// secure has been omitted and marked "!---OMITTED---!".)
+//
+// C:\>env0 ARBITRARY TEXT
+//
+// -- Environment members --
+// CommandLine: env0 ARBITRARY TEXT
+// GetCommandLineArgs: env0, ARBITRARY, TEXT
+// CurrentDirectory: C:\Documents and Settings\!---OMITTED---!
+// ExitCode: 0
+// HasShutdownStarted: False
+// MachineName: !---OMITTED---!
+// NewLine:
+// first line
+// second line
+// third line
+// OSVersion: Microsoft Windows NT 5.1.2600.0
+// StackTrace: ' at System.Environment.GetStackTrace(Exception e)
+// at System.Environment.GetStackTrace(Exception e)
+// at System.Environment.get_StackTrace()
+// at Sample.Main()'
+// SystemDirectory: C:\WINNT\System32
+// TickCount: 17995355
+// UserDomainName: !---OMITTED---!
+// UserInteractive: True
+// UserName: !---OMITTED---!
+// Version: !---OMITTED---!
+// WorkingSet: 5038080
+// ExpandEnvironmentVariables:
+// My system drive is C: and my system root is C:\WINNT
+// GetEnvironmentVariable:
+// My temporary directory is C:\DOCUME~1\!---OMITTED---!\LOCALS~1\Temp.
+// GetEnvironmentVariables:
+// !---OMITTED---!
+// GetFolderPath: C:\WINNT\System32
+// GetLogicalDrives: A:\, C:\, D:\
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/Overview/fs.fsproj b/snippets/fsharp/System/Environment/Overview/fs.fsproj
new file mode 100644
index 00000000000..83a44399199
--- /dev/null
+++ b/snippets/fsharp/System/Environment/Overview/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ProcessorCount/fs.fsproj b/snippets/fsharp/System/Environment/ProcessorCount/fs.fsproj
new file mode 100644
index 00000000000..308cb29812b
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ProcessorCount/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/ProcessorCount/pc.fs b/snippets/fsharp/System/Environment/ProcessorCount/pc.fs
new file mode 100644
index 00000000000..ca56a2cca5c
--- /dev/null
+++ b/snippets/fsharp/System/Environment/ProcessorCount/pc.fs
@@ -0,0 +1,10 @@
+//
+// This example demonstrates the
+// Environment.ProcessorCount property.
+open System
+
+printfn $"The number of processors on this computer is {Environment.ProcessorCount}."
+
+// This example produces the following results:
+// The number of processors on this computer is 1.
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/StackTrace/fs.fsproj b/snippets/fsharp/System/Environment/StackTrace/fs.fsproj
new file mode 100644
index 00000000000..06e095aa314
--- /dev/null
+++ b/snippets/fsharp/System/Environment/StackTrace/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/StackTrace/stacktrace.fs b/snippets/fsharp/System/Environment/StackTrace/stacktrace.fs
new file mode 100644
index 00000000000..406cbb60dd2
--- /dev/null
+++ b/snippets/fsharp/System/Environment/StackTrace/stacktrace.fs
@@ -0,0 +1,12 @@
+//
+// Sample for the Environment.StackTrace property
+open System
+
+printfn $"\nStackTrace: '{Environment.StackTrace}'"
+
+// This example produces the following results:
+// StackTrace: ' at System.Environment.GetStackTrace(Exception e)
+// at System.Environment.GetStackTrace(Exception e)
+// at System.Environment.get_StackTrace()
+// at .$Stacktrace.main@()'
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/SystemDirectory/fs.fsproj b/snippets/fsharp/System/Environment/SystemDirectory/fs.fsproj
new file mode 100644
index 00000000000..0a3e781e26f
--- /dev/null
+++ b/snippets/fsharp/System/Environment/SystemDirectory/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/SystemDirectory/systemdirectory.fs b/snippets/fsharp/System/Environment/SystemDirectory/systemdirectory.fs
new file mode 100644
index 00000000000..40280a8679f
--- /dev/null
+++ b/snippets/fsharp/System/Environment/SystemDirectory/systemdirectory.fs
@@ -0,0 +1,10 @@
+//
+// Sample for the Environment.SystemDirectory property
+open System
+
+// <-- Keep this information secure! -->
+printfn $"\nSystemDirectory: {Environment.SystemDirectory}"
+
+// This example produces the following results:
+// SystemDirectory: C:\WINNT\System32
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/TickCount/fs.fsproj b/snippets/fsharp/System/Environment/TickCount/fs.fsproj
new file mode 100644
index 00000000000..4832d4205f6
--- /dev/null
+++ b/snippets/fsharp/System/Environment/TickCount/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/TickCount/tickcount.fs b/snippets/fsharp/System/Environment/TickCount/tickcount.fs
new file mode 100644
index 00000000000..404bbbdfa55
--- /dev/null
+++ b/snippets/fsharp/System/Environment/TickCount/tickcount.fs
@@ -0,0 +1,16 @@
+//
+// Sample for the Environment.TickCount property.
+
+// TickCount cycles between Int32.MinValue, which is a negative
+// number, and Int32.MaxValue once every 49.8 days. This sample
+// removes the sign bit to yield a nonnegative number that cycles
+// between zero and Int32.MaxValue once every 24.9 days.
+
+open System
+
+let result = Environment.TickCount &&& Int32.MaxValue
+printfn $"TickCount: {result}"
+
+// This example produces an output similar to the following:
+// TickCount: 101931139
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/UserInteractive/fs.fsproj b/snippets/fsharp/System/Environment/UserInteractive/fs.fsproj
new file mode 100644
index 00000000000..ac00084c6ca
--- /dev/null
+++ b/snippets/fsharp/System/Environment/UserInteractive/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/UserInteractive/userinteractive.fs b/snippets/fsharp/System/Environment/UserInteractive/userinteractive.fs
new file mode 100644
index 00000000000..0b9333148e6
--- /dev/null
+++ b/snippets/fsharp/System/Environment/UserInteractive/userinteractive.fs
@@ -0,0 +1,9 @@
+//
+// Sample for the Environment.UserInteractive property
+open System
+
+printfn $"\nUserInteractive: {Environment.UserInteractive}"
+
+// This example produces the following results:
+// UserInteractive: True
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/UserName/fs.fsproj b/snippets/fsharp/System/Environment/UserName/fs.fsproj
new file mode 100644
index 00000000000..18a79f308ea
--- /dev/null
+++ b/snippets/fsharp/System/Environment/UserName/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/UserName/username.fs b/snippets/fsharp/System/Environment/UserName/username.fs
new file mode 100644
index 00000000000..c6888a9e1f1
--- /dev/null
+++ b/snippets/fsharp/System/Environment/UserName/username.fs
@@ -0,0 +1,8 @@
+//
+// Sample for the Environment.UserName property
+open System
+
+// <-- Keep this information secure! -->
+printfn $"\nUserName: {Environment.UserName}"
+
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/Version/fs.fsproj b/snippets/fsharp/System/Environment/Version/fs.fsproj
new file mode 100644
index 00000000000..318cc3bd272
--- /dev/null
+++ b/snippets/fsharp/System/Environment/Version/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/Version/version.fs b/snippets/fsharp/System/Environment/Version/version.fs
new file mode 100644
index 00000000000..0571da40b82
--- /dev/null
+++ b/snippets/fsharp/System/Environment/Version/version.fs
@@ -0,0 +1,6 @@
+//
+// Sample for the Environment.Version property
+open System
+
+printfn $"\nVersion: {Environment.Version}"
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/WorkingSet/fs.fsproj b/snippets/fsharp/System/Environment/WorkingSet/fs.fsproj
new file mode 100644
index 00000000000..575554f3983
--- /dev/null
+++ b/snippets/fsharp/System/Environment/WorkingSet/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/snippets/fsharp/System/Environment/WorkingSet/workingset.fs b/snippets/fsharp/System/Environment/WorkingSet/workingset.fs
new file mode 100644
index 00000000000..8568b540499
--- /dev/null
+++ b/snippets/fsharp/System/Environment/WorkingSet/workingset.fs
@@ -0,0 +1,9 @@
+//
+// Sample for the Environment.WorkingSet property
+open System
+
+printfn $"WorkingSet: {Environment.WorkingSet}"
+
+// This example produces the following results:
+// WorkingSet: 5038080
+//
\ No newline at end of file
diff --git a/xml/System/Environment+SpecialFolder.xml b/xml/System/Environment+SpecialFolder.xml
index bb00ce8b32a..e3ab85d7bf8 100644
--- a/xml/System/Environment+SpecialFolder.xml
+++ b/xml/System/Environment+SpecialFolder.xml
@@ -62,6 +62,7 @@
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Environment.GetFolderPath/CPP/getfolderpath.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment+SpecialFolder/Overview/getfolderpath.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment+SpecialFolder/Overview/getfolderpath.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Environment.GetFolderPath/VB/getfolderpath.vb" id="Snippet1":::
]]>
diff --git a/xml/System/Environment.xml b/xml/System/Environment.xml
index 93e15076452..9ca18c2e208 100644
--- a/xml/System/Environment.xml
+++ b/xml/System/Environment.xml
@@ -65,6 +65,7 @@
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/environment.class/CPP/env0.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/Overview/env0.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/Overview/env0.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.class/VB/env0.vb" id="Snippet1":::
]]>
@@ -129,6 +130,7 @@
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/environment.CommandLine/CPP/commandline.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/CommandLine/commandline.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/CommandLine/commandline.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.CommandLine/VB/commandline.vb" id="Snippet1":::
]]>
@@ -184,6 +186,7 @@
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Environment/CPP/Vars1.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/CurrentDirectory/Vars1.cs" id="Snippet4":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/CurrentDirectory/Vars1.fs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Environment/VB/Vars1.vb" id="Snippet4":::
]]>
@@ -382,6 +385,7 @@
The following is a simple app named Double.exe that doubles an integer value passed to it as a command-line argument. The value assigns error codes to the property to indicate error conditions. Note that you must add a reference to the System.Numerics.dll assembly to successfully compile the example.
:::code language="csharp" source="~/snippets/csharp/System/Environment/ExitCode/double.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/ExitCode/double.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.environment.exitcode/vb/double.vb" id="Snippet1":::
The example can then be invoked from a batch file such as the following, which makes its error codes accessible by using the `ERRORLEVEL` command.
@@ -428,6 +432,7 @@ Invalid argument
Note that code for Double.exe is identical in function to the following example, except that the former defines an entry point named `Main` that has no return value, whereas this example defines an entry point named `Main` that returns an integer.
:::code language="csharp" source="~/snippets/csharp/System/Environment/ExitCode/double1.cs" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/ExitCode/double1.fs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.environment.exitcode/vb/double1.vb" id="Snippet2":::
]]>
@@ -498,6 +503,7 @@ Invalid argument
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/environment.ExpandEnvironmentVariables/CPP/expandenvironmentvariables.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/ExpandEnvironmentVariables/expandenvironmentvariables.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/ExpandEnvironmentVariables/expandenvironmentvariables.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.ExpandEnvironmentVariables/VB/expandenvironmentvariables.vb" id="Snippet1":::
]]>
@@ -589,6 +595,7 @@ Calling the `Environment.FailFast` method to terminate execution of an applicati
The following example writes a log entry to the Windows Application event log and terminates the current process.
:::code language="csharp" source="~/snippets/csharp/System/Environment/FailFast/ff.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/FailFast/ff.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.FailFast/vb/ff.vb" id="Snippet1":::
]]>
@@ -745,6 +752,7 @@ In .NET 5 and later versions, for single-file publishing, the first element is t
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Environment.GetCommandLineArgs/CPP/getcommandlineargs.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetCommandLineArgs/getcommandlineargs.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetCommandLineArgs/getcommandlineargs.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Environment.GetCommandLineArgs/VB/getcommandlineargs.vb" id="Snippet1":::
]]>
@@ -853,11 +861,13 @@ On macOS and Linux, the environment block of the current process includes the fo
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Environment/CPP/Vars1.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/CurrentDirectory/Vars1.cs" id="Snippet4":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/CurrentDirectory/Vars1.fs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Environment/VB/Vars1.vb" id="Snippet4":::
The following example attempts to retrieve the value of an environment variable named `Test1` from the process environment block. If the variable doesn't exist, the example creates its and retrieves its value. The example displays the value of the variable. If the example created the variable, it also calls the method with each member of the enumeration to establish that the variable can be retrieved only from the current process environment block. Finally, if the example created the variable, it deletes it.
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.cs":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.fs":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.environment.getenvironmentvariable/vb/getenvironmentvariableex1.vb":::
]]>
@@ -947,6 +957,7 @@ Per-process environment variables are:
The following example creates environment variables for the , , and targets, checks whether the operating system registry contains the user and machine environment variables, then deletes the environment variables. Because .NET on Unix-based systems does not support per-user and per-machine environment variables, only and with a value of successfully store an environment variable to the process environment block.
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariable/gsev.cs":::
+:::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.getsetenvar/VB/gsev.vb":::
]]>
@@ -1045,6 +1056,7 @@ On MacOS and Linux, the `GetEnvironmentVariables` method retrieves the name and
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Environment.GetEnvironmentVariables/CPP/getenvironmentvariables.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariables/getenvironmentvariables.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariables/getenvironmentvariables.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Environment.GetEnvironmentVariables/VB/getenvironmentvariables.vb" id="Snippet1":::
]]>
@@ -1122,6 +1134,7 @@ Per-machine and per-user environment variables are not supported. A `target` val
The following example creates environment variables for the , , and targets, checks whether the operating system registry contains the user and machine environment variables, then deletes the environment variables. Because .NET on Unix-based systems does not support per-user and per-machine environment variables, only and with a value of successfully store an environment variable to the process environment block.
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariable/gsev.cs":::
+:::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.getsetenvar/VB/gsev.vb":::
]]>
@@ -1207,6 +1220,7 @@ The following example creates environment variables for the
@@ -1337,6 +1351,7 @@ The following example creates environment variables for the
@@ -1546,6 +1561,7 @@ The following example creates environment variables for the
@@ -1611,6 +1627,7 @@ The following example creates environment variables for the
@@ -1772,6 +1789,7 @@ For more information about processor groups and logical processors, see [Process
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/environment.processorcount/CPP/pc.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Environment/ProcessorCount/pc.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/ProcessorCount/pc.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.processorcount/VB/pc.vb" id="Snippet1":::
]]>
@@ -1902,6 +1920,7 @@ If the executable is renamed or deleted before this property is first accessed,
The following example attempts to retrieve the value of an environment variable named `Test1` from the process environment block. If the variable doesn't exist, the example creates the variable and retrieves its value. The example displays the value of the variable. For .NET implementations running on Windows systems, it also calls the method with each member of the enumeration to establish that the variable can be retrieved only from the current process environment block. (.NET implementations on Unix-based systems only support variables in the process environment block.) Finally, if the example created the variable, it deletes it.
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.cs":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariable/getenvironmentvariableex1.fs":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.environment.getenvironmentvariable/vb/getenvironmentvariableex1.vb":::
]]>
@@ -2015,6 +2034,7 @@ If `target` is , , and targets, checks whether the operating system registry contains the user and machine environment variables, then deletes the environment variables. Because .NET on Unix-based systems does not support per-user and per-machine environment variables, only and with a value of successfully store an environment variable to the process environment block.
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariable/gsev.cs":::
+:::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.getsetenvar/VB/gsev.vb":::
]]>
@@ -2131,6 +2151,7 @@ The following example creates environment variables for the
@@ -2191,6 +2212,7 @@ The following example creates environment variables for the
@@ -2314,6 +2336,7 @@ The following example creates environment variables for the
@@ -2466,6 +2489,7 @@ The following example creates environment variables for the
@@ -2533,6 +2557,7 @@ The following example creates environment variables for the
@@ -2595,6 +2620,7 @@ The following example creates environment variables for the
@@ -2652,6 +2678,7 @@ The following example creates environment variables for the
diff --git a/xml/System/EnvironmentVariableTarget.xml b/xml/System/EnvironmentVariableTarget.xml
index 8c3e5bc2589..da128598e1b 100644
--- a/xml/System/EnvironmentVariableTarget.xml
+++ b/xml/System/EnvironmentVariableTarget.xml
@@ -74,6 +74,7 @@ The target can be one of three locations:
The following example uses the enumeration in methods that create, retrieve, and delete environment variables. The output from the example shows that environmnent variables stored and retrieved without specifying a `EnvironmentVariableTarget` value are stored in the environment block associated with the current process (`EnvironmentVariableTarget.Process`). The example output from Unix-based systems also shows that attempts to define an environment variable with a value other than `EnvironmentVariableTarget.Process` is ignored.
:::code language="csharp" source="~/snippets/csharp/System/Environment/GetEnvironmentVariable/gsev.cs":::
+:::code language="fsharp" source="~/snippets/fsharp/System/Environment/GetEnvironmentVariable/gsev.fs":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/environment.getsetenvar/VB/gsev.vb":::
]]>