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
- Models.cs
- SiteMapDataSourceDesigner.cs
- ClientSideQueueItem.cs
- ContentElement.cs
- XPathDescendantIterator.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DesignerDataRelationship.cs
- Serializer.cs
- HttpWriter.cs
- WebBrowsableAttribute.cs
- TdsParser.cs
- CaseInsensitiveComparer.cs
- ComponentEditorPage.cs
- HttpFileCollectionBase.cs
- CompiledQuery.cs
- XmlParserContext.cs
- HtmlLink.cs
- PolyQuadraticBezierSegment.cs
- UdpRetransmissionSettings.cs
- LocalizabilityAttribute.cs
- Int16Converter.cs
- CssClassPropertyAttribute.cs
- ObjectParameterCollection.cs
- InstancePersistenceEvent.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- SecurityElement.cs
- TraceListeners.cs
- InternalCache.cs
- WindowsSecurityTokenAuthenticator.cs
- DrawingContextDrawingContextWalker.cs
- Pens.cs
- MatrixAnimationBase.cs
- DataTableMappingCollection.cs
- ObservableCollectionDefaultValueFactory.cs
- Cloud.cs
- SqlDataSourceQueryEditor.cs
- WizardStepBase.cs
- DrawingAttributesDefaultValueFactory.cs
- BuilderInfo.cs
- QueryContinueDragEventArgs.cs
- AnonymousIdentificationModule.cs
- OLEDB_Enum.cs
- XamlStackWriter.cs
- dbdatarecord.cs
- CheckBox.cs
- XmlNamespaceMapping.cs
- XmlAttributes.cs
- IncrementalReadDecoders.cs
- CaseInsensitiveHashCodeProvider.cs
- DataControlFieldCell.cs
- XmlBuffer.cs
- Operators.cs
- COM2PropertyBuilderUITypeEditor.cs
- DataDesignUtil.cs
- ListViewAutomationPeer.cs
- XmlDataProvider.cs
- ObjectMemberMapping.cs
- OleDbDataAdapter.cs
- VersionedStream.cs
- cookie.cs
- KerberosSecurityTokenProvider.cs
- TextFormatterImp.cs
- TextTabProperties.cs
- DashStyle.cs
- SoapExtension.cs
- GregorianCalendarHelper.cs
- Task.cs
- QuotedPrintableStream.cs
- SpeakProgressEventArgs.cs
- VariableExpressionConverter.cs
- LogSwitch.cs
- ProgressBarRenderer.cs
- DependencyPropertyKey.cs
- Page.cs
- TransformerConfigurationWizardBase.cs
- RemoteWebConfigurationHostServer.cs
- ConfigXmlSignificantWhitespace.cs
- Win32.cs
- ModuleElement.cs
- ControlValuePropertyAttribute.cs
- WindowsSecurityTokenAuthenticator.cs
- EntityDataSourceChangingEventArgs.cs
- ComponentConverter.cs
- ConfigurationManagerHelperFactory.cs
- FormsAuthenticationUserCollection.cs
- ADMembershipUser.cs
- DataSourceXmlSubItemAttribute.cs
- _ChunkParse.cs
- _ConnectStream.cs
- TemplateControlParser.cs
- ResourceDescriptionAttribute.cs
- ZipIOExtraFieldPaddingElement.cs
- ChannelDispatcher.cs
- GeometryHitTestResult.cs
- Focus.cs
- GeneralTransform3DGroup.cs
- TabControl.cs
- PackagingUtilities.cs
- RegexCompilationInfo.cs
- FixedSOMPage.cs