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
- AudioException.cs
- XmlNamespaceMapping.cs
- EpmContentSerializerBase.cs
- QuaternionValueSerializer.cs
- BlurBitmapEffect.cs
- FixedSOMGroup.cs
- DispatcherExceptionEventArgs.cs
- XNodeValidator.cs
- bidPrivateBase.cs
- LocalBuilder.cs
- CustomLineCap.cs
- SecurityCredentialsManager.cs
- CatalogPartChrome.cs
- NodeInfo.cs
- PermissionToken.cs
- XpsDocument.cs
- RuntimeWrappedException.cs
- BrowserDefinitionCollection.cs
- SkewTransform.cs
- EventLogLink.cs
- NameValueFileSectionHandler.cs
- AssociativeAggregationOperator.cs
- WebBaseEventKeyComparer.cs
- QilNode.cs
- ChineseLunisolarCalendar.cs
- DisplayNameAttribute.cs
- TextRangeSerialization.cs
- NumberSubstitution.cs
- HttpResponseHeader.cs
- XmlCodeExporter.cs
- CheckBoxPopupAdapter.cs
- SchemeSettingElementCollection.cs
- Mapping.cs
- BamlLocalizabilityResolver.cs
- SqlDependencyListener.cs
- ConditionCollection.cs
- BeginStoryboard.cs
- ObjectListItemCollection.cs
- HorizontalAlignConverter.cs
- DocumentSequence.cs
- InvalidWMPVersionException.cs
- PathData.cs
- MimeObjectFactory.cs
- BackEase.cs
- XmlSiteMapProvider.cs
- MethodRental.cs
- MouseEvent.cs
- WebBrowserDocumentCompletedEventHandler.cs
- BaseAddressPrefixFilterElement.cs
- Crc32Helper.cs
- ChannelServices.cs
- NumberFormatInfo.cs
- ContainerControl.cs
- EmbeddedObject.cs
- Stroke.cs
- TextEditorLists.cs
- Point4D.cs
- DataGridDetailsPresenterAutomationPeer.cs
- DataGridViewBand.cs
- StringResourceManager.cs
- SingleObjectCollection.cs
- PropertyMetadata.cs
- XpsResource.cs
- SegmentInfo.cs
- NotImplementedException.cs
- Range.cs
- Currency.cs
- NavigatingCancelEventArgs.cs
- ProjectionPlan.cs
- ModelPerspective.cs
- SoapReflector.cs
- TimerElapsedEvenArgs.cs
- DrawingContextDrawingContextWalker.cs
- SqlFlattener.cs
- TextServicesManager.cs
- ToolStripSeparator.cs
- ComboBoxRenderer.cs
- PointHitTestResult.cs
- TableFieldsEditor.cs
- ListParagraph.cs
- SingleResultAttribute.cs
- ProvidersHelper.cs
- ContainerUtilities.cs
- TypeReference.cs
- IODescriptionAttribute.cs
- GroupQuery.cs
- InputMethod.cs
- PolyLineSegment.cs
- HostedElements.cs
- ListBoxItemWrapperAutomationPeer.cs
- HScrollBar.cs
- SecurityIdentifierElementCollection.cs
- IBuiltInEvidence.cs
- FormViewInsertEventArgs.cs
- HyperLinkField.cs
- MessageEncodingBindingElement.cs
- Matrix.cs
- InfocardChannelParameter.cs
- MenuItemStyleCollectionEditor.cs
- BamlResourceContent.cs