Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / UInt64Converter.cs / 1 / UInt64Converter.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using Microsoft.Win32;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Serialization.Formatters;
using System.Security.Permissions;
///
/// Provides a type converter to convert 64-bit unsigned integer objects to and
/// from various other representations.
///
[HostProtection(SharedState = true)]
public class UInt64Converter : BaseNumberConverter {
///
/// The Type this converter is targeting (e.g. Int16, UInt64, etc.)
///
internal override Type TargetType {
get {
return typeof(UInt64);
}
}
///
/// Convert the given value to a string using the given radix
///
internal override object FromString(string value, int radix) {
return Convert.ToUInt64(value, radix);
}
///
/// Convert the given value to a string using the given formatInfo
///
internal override object FromString(string value, NumberFormatInfo formatInfo) {
return UInt64.Parse(value, NumberStyles.Integer, formatInfo);
}
///
/// Convert the given value to a string using the given CultureInfo
///
internal override object FromString(string value, CultureInfo culture){
return UInt64.Parse(value, culture);
}
///
/// Convert the given value from a string using the given formatInfo
///
internal override string ToString(object value, NumberFormatInfo formatInfo) {
return ((UInt64)value).ToString("G", formatInfo);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SQLMoneyStorage.cs
- StrokeCollectionDefaultValueFactory.cs
- Geometry.cs
- DataSourceDesigner.cs
- CatalogZoneBase.cs
- followingsibling.cs
- ConfigPathUtility.cs
- DynamicObject.cs
- CodeNamespaceCollection.cs
- MonikerSyntaxException.cs
- AuthStoreRoleProvider.cs
- NetworkInterface.cs
- AtomServiceDocumentSerializer.cs
- PropertyEmitter.cs
- SeparatorAutomationPeer.cs
- DomNameTable.cs
- CodeCompileUnit.cs
- RequestStatusBarUpdateEventArgs.cs
- Propagator.JoinPropagator.cs
- EventItfInfo.cs
- FontSizeConverter.cs
- KeySpline.cs
- BCLDebug.cs
- XPathDocumentIterator.cs
- DataSpaceManager.cs
- AccessControlEntry.cs
- TextParaLineResult.cs
- WebPartUserCapability.cs
- FixedDocumentPaginator.cs
- SimpleExpression.cs
- StylusLogic.cs
- XmlBuffer.cs
- GPRECTF.cs
- X509Utils.cs
- Int16Converter.cs
- CheckBoxStandardAdapter.cs
- UInt32.cs
- HitTestWithPointDrawingContextWalker.cs
- ValueExpressions.cs
- TrustManager.cs
- GraphicsState.cs
- WindowShowOrOpenTracker.cs
- TimeSpanConverter.cs
- XmlQualifiedName.cs
- RegexGroup.cs
- AtomPub10CategoriesDocumentFormatter.cs
- StrokeDescriptor.cs
- SecurityHelper.cs
- OverlappedAsyncResult.cs
- TCPClient.cs
- GlobalItem.cs
- PaperSource.cs
- MailMessageEventArgs.cs
- AsymmetricAlgorithm.cs
- TextReader.cs
- Socket.cs
- XPathDocumentIterator.cs
- ObjectView.cs
- MetafileHeader.cs
- PackWebResponse.cs
- SQLDoubleStorage.cs
- Tuple.cs
- _ListenerResponseStream.cs
- PenContext.cs
- RuntimeResourceSet.cs
- SqlClientMetaDataCollectionNames.cs
- KeyTime.cs
- NumericUpDownAcceleration.cs
- HttpCookiesSection.cs
- RecipientInfo.cs
- VisualTreeHelper.cs
- WorkflowNamespace.cs
- LayoutSettings.cs
- NotifyParentPropertyAttribute.cs
- AssociationEndMember.cs
- AssemblyResourceLoader.cs
- PathData.cs
- WebPartConnectionsEventArgs.cs
- Int32AnimationUsingKeyFrames.cs
- PieceNameHelper.cs
- AvTrace.cs
- MultipartContentParser.cs
- BindableTemplateBuilder.cs
- HMACRIPEMD160.cs
- XmlSerializableServices.cs
- Globals.cs
- BatchServiceHost.cs
- hwndwrapper.cs
- DoWorkEventArgs.cs
- XmlSchemaValidator.cs
- PageAsyncTaskManager.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- PackageRelationship.cs
- CompositeTypefaceMetrics.cs
- HitTestParameters3D.cs
- cache.cs
- VerticalAlignConverter.cs
- XmlSchemaNotation.cs
- MailWriter.cs
- HashHelper.cs