Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- InlineObject.cs
- TypedElement.cs
- TextModifierScope.cs
- ClockGroup.cs
- TableLayoutStyle.cs
- ExecutionScope.cs
- UnionExpr.cs
- CallbackHandler.cs
- WaitHandle.cs
- AccessDataSource.cs
- MulticastNotSupportedException.cs
- InheritanceContextChangedEventManager.cs
- XmlSchemaNotation.cs
- StandardToolWindows.cs
- LocalizableAttribute.cs
- XmlQuerySequence.cs
- FileSystemEventArgs.cs
- Component.cs
- FragmentQueryKB.cs
- PartialList.cs
- XpsStructure.cs
- WebPartDescription.cs
- PropertyItemInternal.cs
- FileUtil.cs
- TrackingProfileCache.cs
- CardSpaceSelector.cs
- SQLResource.cs
- ProtocolsConfigurationEntry.cs
- SiteMapSection.cs
- BitmapEffect.cs
- GradientSpreadMethodValidation.cs
- SqlDataSourceCache.cs
- TraceHandler.cs
- ImageSource.cs
- StatusBarAutomationPeer.cs
- webproxy.cs
- HeaderPanel.cs
- MachineKeyConverter.cs
- TextRunCache.cs
- EncoderFallback.cs
- SelectionEditor.cs
- ByteAnimationUsingKeyFrames.cs
- EntityWithKeyStrategy.cs
- messageonlyhwndwrapper.cs
- PageContentCollection.cs
- EncoderNLS.cs
- BamlRecordWriter.cs
- ReadOnlyPropertyMetadata.cs
- BaseValidator.cs
- AuthenticationSection.cs
- PublisherIdentityPermission.cs
- GetPageNumberCompletedEventArgs.cs
- DbConnectionFactory.cs
- HttpCapabilitiesBase.cs
- Suspend.cs
- DataPagerFieldCollection.cs
- GridItemPattern.cs
- TimelineGroup.cs
- TaiwanCalendar.cs
- DataGridViewComboBoxCell.cs
- DataGridCell.cs
- SizeValueSerializer.cs
- CompiledIdentityConstraint.cs
- FileRegion.cs
- CodeObject.cs
- TimelineCollection.cs
- TextStore.cs
- CodeDelegateCreateExpression.cs
- HyperLinkDataBindingHandler.cs
- SqlCacheDependency.cs
- COMException.cs
- SafeIUnknown.cs
- ClassDataContract.cs
- GenericTypeParameterBuilder.cs
- TriggerAction.cs
- InstanceDataCollectionCollection.cs
- IsolatedStorageFile.cs
- XmlQueryOutput.cs
- GridViewRowEventArgs.cs
- ProcessInputEventArgs.cs
- MasterPageBuildProvider.cs
- DropDownHolder.cs
- ExtentCqlBlock.cs
- UriTemplateLiteralPathSegment.cs
- CollectionEditor.cs
- ActivatedMessageQueue.cs
- HTMLTextWriter.cs
- ZipFileInfo.cs
- SoapIgnoreAttribute.cs
- RecordConverter.cs
- DateTimeOffset.cs
- ChtmlTextWriter.cs
- CompModSwitches.cs
- ApplicationDirectoryMembershipCondition.cs
- CustomValidator.cs
- _SingleItemRequestCache.cs
- ResourceReferenceExpression.cs
- Debugger.cs
- ToolStripItemClickedEventArgs.cs
- CompressStream.cs