Code:
/ DotNET / DotNET / 8.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
- TargetInvocationException.cs
- CapiSafeHandles.cs
- UnitySerializationHolder.cs
- MethodToken.cs
- DynamicEntity.cs
- BinaryMethodMessage.cs
- DuplicateWaitObjectException.cs
- BufferedReadStream.cs
- TextBoxView.cs
- TraceProvider.cs
- PolicyStatement.cs
- SqlTransaction.cs
- SqlDataSourceEnumerator.cs
- ToolBarOverflowPanel.cs
- SmiMetaData.cs
- DataRowCollection.cs
- AstTree.cs
- GraphicsState.cs
- Security.cs
- BooleanConverter.cs
- ParameterToken.cs
- Substitution.cs
- Label.cs
- SiteMapNodeItemEventArgs.cs
- ComboBox.cs
- RelOps.cs
- XamlToRtfWriter.cs
- XmlTextWriter.cs
- XmlBufferReader.cs
- SortedList.cs
- LayoutDump.cs
- DefaultMergeHelper.cs
- WebPartMenuStyle.cs
- FactoryId.cs
- TextTreeDeleteContentUndoUnit.cs
- SectionVisual.cs
- QueryCacheEntry.cs
- PersistenceTypeAttribute.cs
- ObjectQueryProvider.cs
- HtmlFormParameterReader.cs
- JpegBitmapEncoder.cs
- TabControlCancelEvent.cs
- SupportsEventValidationAttribute.cs
- PropertyTab.cs
- PrintPreviewControl.cs
- RichTextBox.cs
- ComponentCommands.cs
- Debug.cs
- FileSystemWatcher.cs
- DataShape.cs
- RowUpdatedEventArgs.cs
- Trace.cs
- WorkflowQueue.cs
- AssemblyInfo.cs
- StringReader.cs
- TypeDescriptionProviderAttribute.cs
- XmlSchemaDatatype.cs
- LineSegment.cs
- ClaimTypeElement.cs
- CommandTreeTypeHelper.cs
- PrivacyNoticeBindingElement.cs
- SecurityHeader.cs
- HotSpotCollection.cs
- CustomError.cs
- OdbcException.cs
- Keywords.cs
- XPathNodePointer.cs
- CodeSnippetTypeMember.cs
- PageBuildProvider.cs
- WebPartMenuStyle.cs
- CatalogPart.cs
- QueryableFilterUserControl.cs
- MaskInputRejectedEventArgs.cs
- XamlClipboardData.cs
- Parsers.cs
- PerspectiveCamera.cs
- DataGridViewCellParsingEventArgs.cs
- FontStyleConverter.cs
- HighContrastHelper.cs
- WorkItem.cs
- XPathPatternParser.cs
- StructuredProperty.cs
- SecurityIdentifierElement.cs
- MethodBuilder.cs
- Classification.cs
- SymbolPair.cs
- InternalCompensate.cs
- WebBrowser.cs
- SID.cs
- Brush.cs
- WindowsTreeView.cs
- QueryParameter.cs
- ToolStripLabel.cs
- Parser.cs
- EntityDataSourceEntitySetNameItem.cs
- MetadataPropertyvalue.cs
- NameTable.cs
- DataServiceQueryOfT.cs
- EnumValidator.cs
- RoleManagerEventArgs.cs