Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / UInt64Converter.cs / 1305376 / 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; ////// [HostProtection(SharedState = true)] public class UInt64Converter : BaseNumberConverter { ///Provides a type converter to convert 64-bit unsigned integer objects to and /// from various other representations. ////// 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// 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; ////// [HostProtection(SharedState = true)] public class UInt64Converter : BaseNumberConverter { ///Provides a type converter to convert 64-bit unsigned integer objects to and /// from various other representations. ////// 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ReferenceEqualityComparer.cs
- StreamProxy.cs
- _IPv4Address.cs
- RecognizedWordUnit.cs
- ReferentialConstraintRoleElement.cs
- PermissionListSet.cs
- IPAddress.cs
- InternalDuplexChannelFactory.cs
- KeyedByTypeCollection.cs
- StateMachineAction.cs
- DashStyles.cs
- SmtpFailedRecipientsException.cs
- LineServicesCallbacks.cs
- Version.cs
- URL.cs
- SimplePropertyEntry.cs
- FunctionUpdateCommand.cs
- SqlFacetAttribute.cs
- IBuiltInEvidence.cs
- LicenseException.cs
- RequestResizeEvent.cs
- QilFunction.cs
- BuildManagerHost.cs
- SystemDiagnosticsSection.cs
- DockingAttribute.cs
- DeviceFilterDictionary.cs
- SqlComparer.cs
- NotImplementedException.cs
- InvalidProgramException.cs
- Point.cs
- NCryptNative.cs
- BitmapEffectInput.cs
- ReadOnlyCollectionBase.cs
- MtomMessageEncoder.cs
- EDesignUtil.cs
- RepeatInfo.cs
- HandlerFactoryCache.cs
- AssemblyAttributesGoHere.cs
- PropertyItem.cs
- PolyBezierSegmentFigureLogic.cs
- ProgressBarRenderer.cs
- BoolExpression.cs
- AssemblyInfo.cs
- DataGridView.cs
- HtmlEmptyTagControlBuilder.cs
- DecoderReplacementFallback.cs
- TypeConverterAttribute.cs
- CatalogZone.cs
- DrawingBrush.cs
- ValueQuery.cs
- _AutoWebProxyScriptWrapper.cs
- ServiceOperation.cs
- HostAdapter.cs
- InputGestureCollection.cs
- AudioException.cs
- QilTypeChecker.cs
- ListViewDeletedEventArgs.cs
- DbTypeMap.cs
- ClientCultureInfo.cs
- DesignerCategoryAttribute.cs
- oledbconnectionstring.cs
- ModelVisual3D.cs
- PersonalizationStateQuery.cs
- ResourceReferenceExpressionConverter.cs
- HiddenFieldDesigner.cs
- ValidationError.cs
- DataGridCellsPanel.cs
- AssociationTypeEmitter.cs
- UnsafeNativeMethods.cs
- PlatformCulture.cs
- ElementHostPropertyMap.cs
- CallbackException.cs
- RoleServiceManager.cs
- OrderToken.cs
- CodeBinaryOperatorExpression.cs
- StyleHelper.cs
- PersistNameAttribute.cs
- QuaternionRotation3D.cs
- OracleSqlParser.cs
- ProfileParameter.cs
- BrowsableAttribute.cs
- LineSegment.cs
- TypeLoadException.cs
- Container.cs
- PageRanges.cs
- Part.cs
- CompositeFontInfo.cs
- ServiceOperationParameter.cs
- ApplicationException.cs
- Events.cs
- ImportContext.cs
- DataGridViewDataErrorEventArgs.cs
- CachedFontFamily.cs
- DrawingContext.cs
- ItemList.cs
- IHttpResponseInternal.cs
- LogExtent.cs
- PermissionListSet.cs
- ContainerUtilities.cs
- TextChange.cs