2002-07-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / corlib / System / Environment.cs
index ec1044822f5c4b9dbcbbd10217f4c730b92565d3..ccb608bff74357d7ea3e1c61067f3f3c2f9f2fcb 100644 (file)
@@ -22,8 +22,8 @@ namespace System
 {\r
        public sealed class Environment\r
        {\r
-               private Environment () {}
-
+               private Environment () {}\r
+\r
                [MonoTODO]\r
                public enum SpecialFolder\r
                {       // TODO: Determine if these windoze style folder identifiers \r
@@ -60,7 +60,7 @@ namespace System
                        {\r
                                // FIXME: we may need to quote, but any sane person\r
                                // should use GetCommandLineArgs () instead.\r
-                               return String.Join ("", GetCommandLineArgs ());\r
+                               return String.Join (" ", GetCommandLineArgs ());\r
                        }\r
                }\r
 \r
@@ -134,12 +134,13 @@ namespace System
                /// <summary>\r
                /// Get StackTrace\r
                /// </summary>\r
-               [MonoTODO]\r
-               public static string StackTrace\r
-               {\r
-                       get\r
-                       {\r
-                               return null;\r
+               public static string StackTrace {\r
+                       get {\r
+                               try {\r
+                                       throw new Exception ();\r
+                               } catch (Exception e) {\r
+                                       return e.StackTrace;\r
+                               }\r
                        }\r
                }\r
 \r
@@ -166,11 +167,9 @@ namespace System
                /// Get UserDomainName\r
                /// </summary>\r
                [MonoTODO]\r
-               public static string UserDomainName\r
-               {\r
-                       get\r
-                       {\r
-                               return null;\r
+               public static string UserDomainName {\r
+                       get {\r
+                               return MachineName;\r
                        }\r
                }\r
 \r
@@ -205,14 +204,12 @@ namespace System
                }\r
 \r
                /// <summary>\r
-               /// Get the version of an assembly\r
+               /// Get the version of the common language runtime \r
                /// </summary>\r
                [MonoTODO]\r
-               public static Version Version\r
-               {\r
-                       get\r
-                       {\r
-                               return null;\r
+               public static Version Version {\r
+                       get {\r
+                               return new Version();\r
                        }\r
                }\r
 \r