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
- __Error.cs
- ConnectionsZone.cs
- UseLicense.cs
- Parallel.cs
- ToolStripLocationCancelEventArgs.cs
- Completion.cs
- FixedPageStructure.cs
- State.cs
- KeyTimeConverter.cs
- ContentHostHelper.cs
- DbDataSourceEnumerator.cs
- NetworkInformationPermission.cs
- FontInfo.cs
- SystemWebCachingSectionGroup.cs
- CodeValidator.cs
- StringSource.cs
- EqualityComparer.cs
- XmlSchemas.cs
- ToolStripRendererSwitcher.cs
- ServicePointManagerElement.cs
- EpmSyndicationContentSerializer.cs
- DeclarativeCatalogPart.cs
- MailMessageEventArgs.cs
- AuthenticationService.cs
- XmlNamespaceMapping.cs
- SyndicationItemFormatter.cs
- WebPartConnectVerb.cs
- SqlConnectionManager.cs
- XmlSchemaRedefine.cs
- PropertyAccessVisitor.cs
- SizeFConverter.cs
- XsltLibrary.cs
- PenContext.cs
- WriteTimeStream.cs
- Dispatcher.cs
- XmlMapping.cs
- InputScopeManager.cs
- EventLogTraceListener.cs
- TrackingProfileCache.cs
- AppDomainFactory.cs
- DocumentsTrace.cs
- HTTPRemotingHandler.cs
- SymbolPair.cs
- FontSourceCollection.cs
- XamlContextStack.cs
- GiveFeedbackEventArgs.cs
- ContentFileHelper.cs
- GraphicsState.cs
- EntryIndex.cs
- UrlMappingsSection.cs
- AnimationLayer.cs
- BaseValidatorDesigner.cs
- ProjectionPlan.cs
- CatalogPart.cs
- DataServiceException.cs
- util.cs
- UriTemplate.cs
- EdmFunction.cs
- EncodingDataItem.cs
- GridToolTip.cs
- Literal.cs
- PropertyEmitter.cs
- ColumnHeaderConverter.cs
- AddInController.cs
- EventArgs.cs
- SqlBulkCopyColumnMappingCollection.cs
- BStrWrapper.cs
- WindowsListViewSubItem.cs
- FixedSOMGroup.cs
- SecurityDescriptor.cs
- EncryptedPackageFilter.cs
- ResourceProperty.cs
- WhereQueryOperator.cs
- CriticalExceptions.cs
- WinFormsComponentEditor.cs
- GenericArgumentsUpdater.cs
- StylusButtonCollection.cs
- EasingFunctionBase.cs
- SimpleHandlerBuildProvider.cs
- ProxyHelper.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- ProbeDuplex11AsyncResult.cs
- DictionarySectionHandler.cs
- OdbcConnection.cs
- ValuePatternIdentifiers.cs
- UnsafeNativeMethods.cs
- AssemblyContextControlItem.cs
- UnmanagedMemoryStreamWrapper.cs
- StringReader.cs
- ImageIndexConverter.cs
- Parser.cs
- DateTimeSerializationSection.cs
- ScaleTransform.cs
- LoginName.cs
- RoleGroupCollection.cs
- RefType.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ListenerConfig.cs
- SchemaNames.cs
- NetWebProxyFinder.cs