Merge pull request #3056 from BrzVlad/fix-multiple-binprot
[mono.git] / mcs / class / corlib / System / Environment.cs
index 70a4dea80df5d68f1a7de17fc2dfde0121e99606..1db3482d019ccc57b6e6278a032da87be42b94f8 100644 (file)
@@ -57,7 +57,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 143;
+               private const int mono_corlib_version = 148;
 #pragma warning restore 169
 
                [ComVisible (true)]
@@ -985,6 +985,19 @@ namespace System {
                {
 
                }
+
+               // Copied from referencesource Environment
+               internal static String GetStackTrace(Exception e, bool needFileInfo)
+               {
+                       System.Diagnostics.StackTrace st;
+                       if (e == null)
+                               st = new System.Diagnostics.StackTrace(needFileInfo);
+                       else
+                               st = new System.Diagnostics.StackTrace(e, needFileInfo);
+
+                       // Do not include a trailing newline for backwards compatibility
+                       return st.ToString( System.Diagnostics.StackTrace.TraceFormat.Normal );
+               }
        }
 }