Code:
                         / FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / ParseNumbers.cs / 1 / ParseNumbers.cs
                        
                        
                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*============================================================
** 
** Class:  ParseNumbers 
**
** 
** Purpose: Methods for Parsing numbers and Strings.
** All methods are implemented in native.
**
** 
===========================================================*/
namespace System { 
 
    //This class contains only static members and does not need to be serializable.
 	using System; 
	using System.Runtime.CompilerServices;
    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); 
        }
        [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 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); 
 
        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); 
 
	    [MethodImplAttribute(MethodImplOptions.InternalCall)]
        public extern static String LongToString(long l, int radix, int width, char paddingChar, int flags); 
    }
}
                        
                        
                        
                        
                    Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BaseHashHelper.cs
- SelectQueryOperator.cs
- UnsafeCollabNativeMethods.cs
- DesignerHelpers.cs
- Literal.cs
- HashRepartitionStream.cs
- _NegotiateClient.cs
- IsolatedStorageFile.cs
- CalendarDataBindingHandler.cs
- WindowsGraphics2.cs
- XmlWrappingReader.cs
- CriticalFinalizerObject.cs
- ExcCanonicalXml.cs
- ListViewPagedDataSource.cs
- EventRecord.cs
- Int64AnimationUsingKeyFrames.cs
- CustomWebEventKey.cs
- ReferencedType.cs
- DBCommandBuilder.cs
- SQLDoubleStorage.cs
- GroupBox.cs
- SchemaCollectionPreprocessor.cs
- ObjectListItemCollection.cs
- Subset.cs
- Pen.cs
- RSAPKCS1SignatureDeformatter.cs
- ObjectDataSourceMethodEventArgs.cs
- X509Certificate2.cs
- _ConnectionGroup.cs
- Native.cs
- WebResponse.cs
- UIElementCollection.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- TraceHwndHost.cs
- GeometryHitTestParameters.cs
- WindowsHyperlink.cs
- RuntimeWrappedException.cs
- Sql8ConformanceChecker.cs
- DeleteHelper.cs
- TypeDependencyAttribute.cs
- UriGenerator.cs
- _BufferOffsetSize.cs
- Visual3D.cs
- WhitespaceRule.cs
- counter.cs
- LayoutUtils.cs
- _CookieModule.cs
- XmlSchemaImport.cs
- CodeFieldReferenceExpression.cs
- ThreadStartException.cs
- CustomAssemblyResolver.cs
- ReadOnlyDataSourceView.cs
- ColumnCollection.cs
- HttpCacheVary.cs
- CodeParameterDeclarationExpressionCollection.cs
- CommandDevice.cs
- ListViewGroupConverter.cs
- TripleDESCryptoServiceProvider.cs
- NamespaceDecl.cs
- TextWriter.cs
- ControlCachePolicy.cs
- WebPartZoneCollection.cs
- EnumType.cs
- ToolStripPanelCell.cs
- DataObjectEventArgs.cs
- MultiPropertyDescriptorGridEntry.cs
- __ConsoleStream.cs
- CustomAttributeBuilder.cs
- AxisAngleRotation3D.cs
- DataGridItemEventArgs.cs
- Socket.cs
- Token.cs
- GetPageNumberCompletedEventArgs.cs
- DesignerTextViewAdapter.cs
- InternalCache.cs
- ExclusiveTcpListener.cs
- ErrorRuntimeConfig.cs
- SingleSelectRootGridEntry.cs
- ConversionHelper.cs
- XPathNode.cs
- ValidatingReaderNodeData.cs
- GridEntryCollection.cs
- HostElement.cs
- StylusPoint.cs
- SqlBooleanMismatchVisitor.cs
- PageCatalogPart.cs
- DrawingServices.cs
- SplitterCancelEvent.cs
- ArraySortHelper.cs
- ObjectDataSourceStatusEventArgs.cs
- Image.cs
- MediaPlayer.cs
- PartialCachingControl.cs
- DeferredElementTreeState.cs
- ChangeDirector.cs
- ConcurrencyMode.cs
- IisTraceWebEventProvider.cs
- AsyncSerializedWorker.cs
- ISAPIRuntime.cs
- FixedPageAutomationPeer.cs