Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EntryWrittenEventArgs.cs
- ScriptControlManager.cs
- TTSVoice.cs
- FixedPosition.cs
- PrintPageEvent.cs
- IPipelineRuntime.cs
- NotifyParentPropertyAttribute.cs
- FormClosingEvent.cs
- ArraySet.cs
- Int16Storage.cs
- EventLog.cs
- DesignerImageAdapter.cs
- Link.cs
- HyperLinkDataBindingHandler.cs
- QilList.cs
- ToolStripDropDown.cs
- BuiltInExpr.cs
- PageWrapper.cs
- LinearKeyFrames.cs
- EmptyImpersonationContext.cs
- MatrixTransform.cs
- InstallerTypeAttribute.cs
- PointCollection.cs
- Win32PrintDialog.cs
- SemanticBasicElement.cs
- StatusBarItem.cs
- XmlSchemaChoice.cs
- CompleteWizardStep.cs
- SR.cs
- ControlCommandSet.cs
- WSHttpSecurityElement.cs
- ConfigXmlDocument.cs
- HexParser.cs
- SaveFileDialog.cs
- WindowShowOrOpenTracker.cs
- MetadataWorkspace.cs
- TypeConverterBase.cs
- BamlMapTable.cs
- SlipBehavior.cs
- IndentTextWriter.cs
- MenuItemCollection.cs
- LayoutUtils.cs
- HttpBrowserCapabilitiesWrapper.cs
- Thread.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- CombinedHttpChannel.cs
- CompareValidator.cs
- CircleHotSpot.cs
- TextBounds.cs
- XmlSchemaComplexContentRestriction.cs
- MessageCredentialType.cs
- Vertex.cs
- LineServicesCallbacks.cs
- StructuredTypeEmitter.cs
- PopOutPanel.cs
- GridViewRow.cs
- ProcessThreadCollection.cs
- SqlError.cs
- RecognizerBase.cs
- RegisterResponseInfo.cs
- IPGlobalProperties.cs
- XpsSerializationManagerAsync.cs
- XmlQueryStaticData.cs
- NoneExcludedImageIndexConverter.cs
- DateTimeFormat.cs
- DashStyles.cs
- AuthorizationRuleCollection.cs
- ResourceExpressionBuilder.cs
- MsmqAppDomainProtocolHandler.cs
- DictationGrammar.cs
- LocalFileSettingsProvider.cs
- StopStoryboard.cs
- ScaleTransform3D.cs
- XmlReaderSettings.cs
- ECDiffieHellmanCngPublicKey.cs
- ListItemCollection.cs
- HttpValueCollection.cs
- ContainerSelectorBehavior.cs
- SystemIPGlobalStatistics.cs
- XmlSchemaSimpleType.cs
- PagesSection.cs
- SystemWebCachingSectionGroup.cs
- RadioButtonRenderer.cs
- KeyManager.cs
- dsa.cs
- EventToken.cs
- DigitShape.cs
- ReservationCollection.cs
- ProtocolsConfigurationHandler.cs
- ContextMarshalException.cs
- InkCanvasSelection.cs
- ReaderWriterLockWrapper.cs
- ActivityExecutorSurrogate.cs
- FragmentQueryKB.cs
- ConstraintStruct.cs
- ViewBase.cs
- HttpServerChannel.cs
- RelatedCurrencyManager.cs
- Sql8ExpressionRewriter.cs
- Latin1Encoding.cs