Environment

Overview

Helper class to access information about the current process environment.

Location

 

constructor  protected Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor

 

Environment()

 

init()

 

Environment()

 

Sub New()

CurrentDirectory

Returns the current directory

 

class method CurrentDirectory: String

 

static String CurrentDirectory()

 

static func CurrentDirectory() -> String

 

static String CurrentDirectory()

 

Shared Function CurrentDirectory() As String

Equals (Object): Boolean  virtual    (declared in Object) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Equals (Object): Boolean  virtual    (declared in Object) UIKit for Mac

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Exit Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

class method Exit(aCode: Int32)

 

static void Exit(Int32 aCode)

 

static func Exit(_ aCode: Int32)

 

static void Exit(Int32 aCode)

 

Shared Sub Exit(aCode As Int32)

Parameters:

  • aCode:

Finalize  protected virtual    (declared in Object) UIKit for Mac

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

Finalize()

 

func Finalize()

 

Finalize()

 

Sub Finalize()

GetEnvironmentVariable

Gets the value of an environment variable.

 

class method GetEnvironmentVariable(Name: String): String

 

static String GetEnvironmentVariable(String Name)

 

static func GetEnvironmentVariable(_ Name: String) -> String

 

static String GetEnvironmentVariable(String Name)

 

Shared Function GetEnvironmentVariable(Name As String) As String

Parameters:

  • Name: The name of the environment variable to find.

GetEnvironmentVariables

Returns all environment variables.

 

class method GetEnvironmentVariables: ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

static func GetEnvironmentVariables() -> ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

Shared Function GetEnvironmentVariables() As ImmutableDictionary<String, String>

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

NewLine

Contains a newline character; #10 on Posix; #13#10 on Windows.

 

class property NewLine: String read;

 

class String NewLine { get; }

 

static var NewLine: String { get{} }

 

class String NewLine { __get; }

 

Shared ReadOnly Property NewLine() As String

OSName

Returns the name of the OS.

 

class property OSName: String read;

 

class String OSName { get; }

 

static var OSName: String { get{} }

 

class String OSName { __get; }

 

Shared ReadOnly Property OSName() As String

OSVersion

Returns the OS version.

 

class property OSVersion: String read;

 

class String OSVersion { get; }

 

static var OSVersion: String { get{} }

 

class String OSVersion { __get; }

 

Shared ReadOnly Property OSVersion() As String

ProcessorCount

Returns the number of processors.

 

class method ProcessorCount: Int32

 

static Int32 ProcessorCount()

 

static func ProcessorCount() -> Int32

 

static Int32 ProcessorCount()

 

Shared Function ProcessorCount() As Int32

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

SetEnvironmentVariable

Sets the value of an environment variable.

 

class method SetEnvironmentVariable(Name: String; Value: String): Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

static func SetEnvironmentVariable(_ Name: String, _ Value: String) -> Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

Shared Function SetEnvironmentVariable(Name As String, Value As String) As Boolean

Parameters:

  • Name:
  • Value:

TempFolder Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the folder for the temp files.

 

class method TempFolder: Folder

 

static Folder TempFolder()

 

static func TempFolder() -> Folder

 

static Folder TempFolder()

 

Shared Function TempFolder() As Folder

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

UserHomeFolder Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the users home directory.

 

class method UserHomeFolder: Folder

 

static Folder UserHomeFolder()

 

static func UserHomeFolder() -> Folder

 

static Folder UserHomeFolder()

 

Shared Function UserHomeFolder() As Folder

UserName

Contains the users username.

 

class property UserName: String read;

 

class String UserName { get; }

 

static var UserName: String { get{} }

 

class String UserName { __get; }

 

Shared ReadOnly Property UserName() As String

 

NewLine

Contains a newline character; #10 on Posix; #13#10 on Windows.

 

class property NewLine: String read;

 

class String NewLine { get; }

 

static var NewLine: String { get{} }

 

class String NewLine { __get; }

 

Shared ReadOnly Property NewLine() As String

OSName

Returns the name of the OS.

 

class property OSName: String read;

 

class String OSName { get; }

 

static var OSName: String { get{} }

 

class String OSName { __get; }

 

Shared ReadOnly Property OSName() As String

OSVersion

Returns the OS version.

 

class property OSVersion: String read;

 

class String OSVersion { get; }

 

static var OSVersion: String { get{} }

 

class String OSVersion { __get; }

 

Shared ReadOnly Property OSVersion() As String

UserName

Contains the users username.

 

class property UserName: String read;

 

class String UserName { get; }

 

static var UserName: String { get{} }

 

class String UserName { __get; }

 

Shared ReadOnly Property UserName() As String

 

CurrentDirectory

Returns the current directory

 

class method CurrentDirectory: String

 

static String CurrentDirectory()

 

static func CurrentDirectory() -> String

 

static String CurrentDirectory()

 

Shared Function CurrentDirectory() As String

Exit Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

class method Exit(aCode: Int32)

 

static void Exit(Int32 aCode)

 

static func Exit(_ aCode: Int32)

 

static void Exit(Int32 aCode)

 

Shared Sub Exit(aCode As Int32)

Parameters:

  • aCode:

GetEnvironmentVariable

Gets the value of an environment variable.

 

class method GetEnvironmentVariable(Name: String): String

 

static String GetEnvironmentVariable(String Name)

 

static func GetEnvironmentVariable(_ Name: String) -> String

 

static String GetEnvironmentVariable(String Name)

 

Shared Function GetEnvironmentVariable(Name As String) As String

Parameters:

  • Name: The name of the environment variable to find.

GetEnvironmentVariables

Returns all environment variables.

 

class method GetEnvironmentVariables: ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

static func GetEnvironmentVariables() -> ImmutableDictionary<String, String>

 

static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

Shared Function GetEnvironmentVariables() As ImmutableDictionary<String, String>

ProcessorCount

Returns the number of processors.

 

class method ProcessorCount: Int32

 

static Int32 ProcessorCount()

 

static func ProcessorCount() -> Int32

 

static Int32 ProcessorCount()

 

Shared Function ProcessorCount() As Int32

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

SetEnvironmentVariable

Sets the value of an environment variable.

 

class method SetEnvironmentVariable(Name: String; Value: String): Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

static func SetEnvironmentVariable(_ Name: String, _ Value: String) -> Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

Shared Function SetEnvironmentVariable(Name As String, Value As String) As Boolean

Parameters:

  • Name:
  • Value:

TempFolder Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the folder for the temp files.

 

class method TempFolder: Folder

 

static Folder TempFolder()

 

static func TempFolder() -> Folder

 

static Folder TempFolder()

 

Shared Function TempFolder() As Folder

UserHomeFolder Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the users home directory.

 

class method UserHomeFolder: Folder

 

static Folder UserHomeFolder()

 

static func UserHomeFolder() -> Folder

 

static Folder UserHomeFolder()

 

Shared Function UserHomeFolder() As Folder

 

constructor  protected Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor

 

Environment()

 

init()

 

Environment()

 

Sub New()

Equals (Object): Boolean  virtual    (declared in Object) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Equals (Object): Boolean  virtual    (declared in Object) UIKit for Mac

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object) UIKit for Mac

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

Finalize()

 

func Finalize()

 

Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String