summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/ParseNumbers.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /src/mscorlib/src/System/ParseNumbers.cs
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'src/mscorlib/src/System/ParseNumbers.cs')
-rw-r--r--src/mscorlib/src/System/ParseNumbers.cs71
1 files changed, 40 insertions, 31 deletions
diff --git a/src/mscorlib/src/System/ParseNumbers.cs b/src/mscorlib/src/System/ParseNumbers.cs
index 2a375f7584..5287e27669 100644
--- a/src/mscorlib/src/System/ParseNumbers.cs
+++ b/src/mscorlib/src/System/ParseNumbers.cs
@@ -11,52 +11,61 @@
**
**
===========================================================*/
-namespace System {
-
- //This class contains only static members and does not need to be serializable.
- using System;
- using System.Runtime.CompilerServices;
- using System.Runtime.Versioning;
- internal static class ParseNumbers {
- internal const int PrintAsI1=0x40;
- internal const int PrintAsI2=0x80;
- internal const int PrintAsI4=0x100;
- internal const int TreatAsUnsigned=0x200;
- internal const int TreatAsI1=0x400;
- internal const int TreatAsI2=0x800;
- internal const int IsTight=0x1000;
- internal const int NoSpace=0x2000;
-
+//This class contains only static members and does not need to be serializable.
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
+
+namespace System
+{
+ internal static class ParseNumbers
+ {
+ internal const int PrintAsI1 = 0x40;
+ internal const int PrintAsI2 = 0x80;
+ internal const int PrintAsI4 = 0x100;
+ internal const int TreatAsUnsigned = 0x200;
+ internal const int TreatAsI1 = 0x400;
+ internal const int TreatAsI2 = 0x800;
+ internal const int IsTight = 0x1000;
+ internal const int NoSpace = 0x2000;
+
//
//
// NATIVE METHODS
// For comments on these methods please see $\src\vm\COMUtilNative.cpp
//
- public unsafe static long StringToLong(System.String s, int radix, int flags) {
- return StringToLong(s,radix,flags, null);
+ public unsafe static long StringToLong(System.String s, int radix, int flags)
+ {
+ return StringToLong(s, radix, flags, null);
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public unsafe extern static long StringToLong(System.String s, int radix, int flags, int* currPos);
- public unsafe static long StringToLong(System.String s, int radix, int flags, ref int currPos) {
- fixed(int * ppos = &currPos) {
- return StringToLong( s, radix, flags, ppos);
+ public unsafe static long StringToLong(System.String s, int radix, int flags, ref int currPos)
+ {
+ fixed (int* ppos = &currPos)
+ {
+ return StringToLong(s, radix, flags, ppos);
}
}
-
- public unsafe static int StringToInt(System.String s, int radix, int flags) {
- return StringToInt(s,radix,flags, null);
+
+ public unsafe static int StringToInt(System.String s, int radix, int flags)
+ {
+ return StringToInt(s, radix, flags, null);
}
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- public unsafe extern static int StringToInt(System.String s, int radix, int flags, int* currPos);
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public unsafe extern static int StringToInt(System.String s, int radix, int flags, int* currPos);
- public unsafe static int StringToInt(System.String s, int radix, int flags, ref int currPos) {
- fixed(int * ppos = &currPos) {
- return StringToInt( s, radix, flags, ppos);
+ public unsafe static int StringToInt(System.String s, int radix, int flags, ref int currPos)
+ {
+ fixed (int* ppos = &currPos)
+ {
+ return StringToInt(s, radix, flags, ppos);
}
- }
-
+ }
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static String IntToString(int l, int radix, int width, char paddingChar, int flags);