Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Int64Converter.cs / 1305376 / Int64Converter.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 signed integer objects to and
/// from various other representations.
///
[HostProtection(SharedState = true)]
public class Int64Converter : BaseNumberConverter {
///
/// The Type this converter is targeting (e.g. Int16, UInt32, etc.)
///
internal override Type TargetType {
get {
return typeof(Int64);
}
}
///
/// Convert the given value to a string using the given radix
///
internal override object FromString(string value, int radix) {
return Convert.ToInt64(value, radix);
}
///
/// Convert the given value to a string using the given formatInfo
///
internal override object FromString(string value, NumberFormatInfo formatInfo) {
return Int64.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 Int64.Parse(value, culture);
}
///
/// Convert the given value from a string using the given formatInfo
///
internal override string ToString(object value, NumberFormatInfo formatInfo) {
return ((Int64)value).ToString("G", formatInfo);
}
}
}
// 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
- MenuAdapter.cs
- TrackingProfileDeserializationException.cs
- Switch.cs
- URLAttribute.cs
- InstancePersistenceException.cs
- DynamicActivity.cs
- MethodBuilder.cs
- ControlDesigner.cs
- ScriptMethodAttribute.cs
- WmlImageAdapter.cs
- Triangle.cs
- ActivityPropertyReference.cs
- DbParameterCollection.cs
- SessionStateModule.cs
- FactoryGenerator.cs
- PermissionListSet.cs
- ConcurrentBag.cs
- OutputCacheProviderCollection.cs
- XamlPointCollectionSerializer.cs
- FixedPage.cs
- ZoomPercentageConverter.cs
- dataprotectionpermission.cs
- ArgIterator.cs
- HttpWrapper.cs
- FontWeightConverter.cs
- BulletedListEventArgs.cs
- RichTextBoxAutomationPeer.cs
- MbpInfo.cs
- ProgressBarRenderer.cs
- MailSettingsSection.cs
- DecodeHelper.cs
- EnumerableCollectionView.cs
- XmlMapping.cs
- TablePattern.cs
- ClientSession.cs
- ListGeneralPage.cs
- SBCSCodePageEncoding.cs
- PropertyItemInternal.cs
- ObjectQuery_EntitySqlExtensions.cs
- ContractUtils.cs
- DocumentPageView.cs
- CodeLinePragma.cs
- AnnotationHelper.cs
- SelectorAutomationPeer.cs
- InternalCache.cs
- XpsColorContext.cs
- AdRotator.cs
- GradientStopCollection.cs
- ForEachAction.cs
- ObsoleteAttribute.cs
- sqlcontext.cs
- ControlIdConverter.cs
- DetailsViewRowCollection.cs
- dataprotectionpermission.cs
- VirtualPathUtility.cs
- CustomErrorsSectionWrapper.cs
- TypeDependencyAttribute.cs
- FlowDocumentReader.cs
- Localizer.cs
- IpcClientChannel.cs
- RoleGroupCollection.cs
- AuthenticationService.cs
- XmlSerializerFactory.cs
- ListBoxChrome.cs
- Error.cs
- WindowInteropHelper.cs
- Normalization.cs
- IndicShape.cs
- ResourceKey.cs
- ReferencedCollectionType.cs
- ExpressionParser.cs
- XomlCompilerParameters.cs
- CorrelationResolver.cs
- SaveFileDialog.cs
- ArrayList.cs
- PathNode.cs
- ReceiveSecurityHeaderElementManager.cs
- DrawingAttributes.cs
- StorageBasedPackageProperties.cs
- SocketSettings.cs
- ToolboxDataAttribute.cs
- PropertyRecord.cs
- SqlStatistics.cs
- CodeDomLocalizationProvider.cs
- DesignerAttribute.cs
- SynchronousChannel.cs
- TrustLevel.cs
- MailAddressCollection.cs
- NetworkInformationException.cs
- OnOperation.cs
- EventLogLink.cs
- ClassImporter.cs
- CultureSpecificStringDictionary.cs
- CorrelationActionMessageFilter.cs
- BypassElement.cs
- SQLDateTime.cs
- DbParameterCollectionHelper.cs
- Matrix3DConverter.cs
- DbConnectionOptions.cs
- TemplateXamlParser.cs