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
- DataRow.cs
- RecipientInfo.cs
- TextPenaltyModule.cs
- FileFormatException.cs
- StringKeyFrameCollection.cs
- OdbcParameter.cs
- baseaxisquery.cs
- ProfileSettings.cs
- control.ime.cs
- HtmlGenericControl.cs
- StringToken.cs
- TypedDatasetGenerator.cs
- ArgumentException.cs
- UriTemplateVariablePathSegment.cs
- ExceptionRoutedEventArgs.cs
- IgnoreFlushAndCloseStream.cs
- DynamicPropertyReader.cs
- DataGridViewComboBoxEditingControl.cs
- MediaScriptCommandRoutedEventArgs.cs
- Latin1Encoding.cs
- BoundPropertyEntry.cs
- BaseTemplateBuildProvider.cs
- ConstNode.cs
- XmlAutoDetectWriter.cs
- CodeValidator.cs
- DbParameterCollection.cs
- HotSpot.cs
- SimpleMailWebEventProvider.cs
- ProtocolsSection.cs
- NumberAction.cs
- HybridDictionary.cs
- SqlBulkCopyColumnMapping.cs
- ImageAutomationPeer.cs
- XmlLinkedNode.cs
- PageThemeParser.cs
- TextTreePropertyUndoUnit.cs
- ZipIOExtraFieldElement.cs
- IpcChannelHelper.cs
- TextDecoration.cs
- CodeNamespace.cs
- AsymmetricAlgorithm.cs
- MasterPage.cs
- View.cs
- CollectionViewGroupInternal.cs
- SystemDropShadowChrome.cs
- ExpressionPrinter.cs
- CodeCastExpression.cs
- CustomErrorCollection.cs
- X509CertificateCollection.cs
- ExpressionConverter.cs
- RectAnimationUsingKeyFrames.cs
- IPAddress.cs
- ApplicationTrust.cs
- ListComponentEditorPage.cs
- ReplacementText.cs
- ObjectQueryState.cs
- MapPathBasedVirtualPathProvider.cs
- OracleLob.cs
- FormViewDeleteEventArgs.cs
- DesignTimeVisibleAttribute.cs
- TypeLoadException.cs
- CodeObject.cs
- PersonalizableAttribute.cs
- Odbc32.cs
- _SslSessionsCache.cs
- COM2Enum.cs
- FtpWebRequest.cs
- ProfileProvider.cs
- IntegerValidator.cs
- CounterSampleCalculator.cs
- HScrollBar.cs
- BStrWrapper.cs
- ThreadExceptionEvent.cs
- IPHostEntry.cs
- BaseCodePageEncoding.cs
- DispatcherExceptionEventArgs.cs
- SqlCacheDependencySection.cs
- URLEditor.cs
- IPAddressCollection.cs
- DataGridViewCellLinkedList.cs
- NativeMethodsOther.cs
- BitmapFrame.cs
- VoiceChangeEventArgs.cs
- HScrollProperties.cs
- EventLogPermission.cs
- WindowsGraphicsCacheManager.cs
- CodeGotoStatement.cs
- WindowInteractionStateTracker.cs
- EventBuilder.cs
- LocalizedNameDescriptionPair.cs
- AspCompat.cs
- Delegate.cs
- AlphabeticalEnumConverter.cs
- JumpList.cs
- CodeSnippetCompileUnit.cs
- BulletedListEventArgs.cs
- DataListItemEventArgs.cs
- ArrayListCollectionBase.cs
- GridViewUpdatedEventArgs.cs
- CatchBlock.cs