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
- ExecutionContext.cs
- RuntimeConfigLKG.cs
- FontUnit.cs
- ActivationServices.cs
- PageRanges.cs
- Library.cs
- dtdvalidator.cs
- CreationContext.cs
- GenericUriParser.cs
- ContainerControl.cs
- StringToken.cs
- login.cs
- XmlSchemaException.cs
- WebSysDisplayNameAttribute.cs
- AttributeCallbackBuilder.cs
- MetadataPropertyCollection.cs
- InvalidCastException.cs
- Win32.cs
- MetabaseSettings.cs
- SerialPinChanges.cs
- FlagsAttribute.cs
- UntrustedRecipientException.cs
- WindowsBrush.cs
- ContentFilePart.cs
- _SSPISessionCache.cs
- DaylightTime.cs
- TableParagraph.cs
- State.cs
- SemanticResolver.cs
- TextFormatterContext.cs
- WebReferenceOptions.cs
- HostProtectionException.cs
- System.Data_BID.cs
- COM2ExtendedUITypeEditor.cs
- SimpleRecyclingCache.cs
- Identifier.cs
- OpCopier.cs
- Rotation3DKeyFrameCollection.cs
- Helper.cs
- CanonicalFontFamilyReference.cs
- Baml2006ReaderSettings.cs
- Freezable.cs
- UInt64.cs
- CodeSubDirectoriesCollection.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- DomainUpDown.cs
- DiagnosticsElement.cs
- HtmlInputImage.cs
- EditorPartChrome.cs
- ListViewItemMouseHoverEvent.cs
- SubqueryRules.cs
- DeviceContext.cs
- GeneratedCodeAttribute.cs
- BuildDependencySet.cs
- ManagedWndProcTracker.cs
- MessageFilterException.cs
- CodeTypeParameterCollection.cs
- DataService.cs
- ConfigurationSettings.cs
- SplayTreeNode.cs
- ListCollectionView.cs
- SchemaElementDecl.cs
- XmlDocument.cs
- SmtpLoginAuthenticationModule.cs
- Line.cs
- ButtonStandardAdapter.cs
- CompositeFontParser.cs
- AsymmetricKeyExchangeFormatter.cs
- UserControlParser.cs
- GPRECTF.cs
- UIntPtr.cs
- EntityWrapperFactory.cs
- HttpTransportSecurity.cs
- OperatingSystem.cs
- FrameworkPropertyMetadata.cs
- path.cs
- XmlLanguageConverter.cs
- CollectionContainer.cs
- Compiler.cs
- embossbitmapeffect.cs
- RemotingConfiguration.cs
- httpapplicationstate.cs
- AggregateNode.cs
- CodeDirectiveCollection.cs
- TypeConverterHelper.cs
- ConnectionOrientedTransportManager.cs
- CompositeTypefaceMetrics.cs
- DrawListViewColumnHeaderEventArgs.cs
- SqlProvider.cs
- XmlCollation.cs
- TaiwanLunisolarCalendar.cs
- TreeView.cs
- NamespaceInfo.cs
- smtpconnection.cs
- CssTextWriter.cs
- GC.cs
- PropertiesTab.cs
- ProfilePropertySettingsCollection.cs
- GraphicsPath.cs
- DurableOperationContext.cs