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
- ConfigurationManagerInternal.cs
- CompleteWizardStep.cs
- SmtpSection.cs
- MobileContainerDesigner.cs
- PropertyBuilder.cs
- RowType.cs
- PoisonMessageException.cs
- CustomAttributeSerializer.cs
- JumpList.cs
- ReliableSessionBindingElementImporter.cs
- XmlDocumentFragment.cs
- WrappedIUnknown.cs
- MSAAWinEventWrap.cs
- SeparatorAutomationPeer.cs
- HttpHandlerActionCollection.cs
- RelatedView.cs
- XmlWrappingReader.cs
- _SSPISessionCache.cs
- CreateInstanceBinder.cs
- TrustSection.cs
- DataContext.cs
- PropertyChangeTracker.cs
- Utils.cs
- SamlAuthorizationDecisionClaimResource.cs
- AnnotationResourceCollection.cs
- AccessKeyManager.cs
- DataRowView.cs
- bindurihelper.cs
- GridViewCellAutomationPeer.cs
- SpotLight.cs
- TextFragmentEngine.cs
- HandleCollector.cs
- ValidatorCollection.cs
- OneOfConst.cs
- DataTable.cs
- WhiteSpaceTrimStringConverter.cs
- InstanceKeyView.cs
- Token.cs
- WebPartExportVerb.cs
- basecomparevalidator.cs
- ReverseComparer.cs
- ReflectionTypeLoadException.cs
- MSAAEventDispatcher.cs
- ConstraintStruct.cs
- CmsInterop.cs
- DbRetry.cs
- CompareInfo.cs
- DocumentPageView.cs
- GB18030Encoding.cs
- ObjectDataProvider.cs
- SafeViewOfFileHandle.cs
- AudioFormatConverter.cs
- IndentedWriter.cs
- StopStoryboard.cs
- CommandLineParser.cs
- ContextMenuStripActionList.cs
- DropShadowEffect.cs
- SecurityContext.cs
- CatalogPart.cs
- DesignerView.cs
- DeviceContext.cs
- ObjectViewQueryResultData.cs
- XmlSerializerVersionAttribute.cs
- GlyphingCache.cs
- Queue.cs
- FlowPosition.cs
- SchemaElement.cs
- recordstatescratchpad.cs
- SmtpNtlmAuthenticationModule.cs
- PropertyValueUIItem.cs
- SelectionEditingBehavior.cs
- MSAAWinEventWrap.cs
- NameValuePermission.cs
- SmtpReplyReaderFactory.cs
- InputProcessorProfiles.cs
- LineUtil.cs
- StateChangeEvent.cs
- EntityClientCacheEntry.cs
- InputLanguageManager.cs
- MapPathBasedVirtualPathProvider.cs
- DoWorkEventArgs.cs
- XmlSchema.cs
- RoleManagerModule.cs
- ContextMenuService.cs
- DefaultObjectMappingItemCollection.cs
- StatusBar.cs
- ThrowHelper.cs
- RuntimeEnvironment.cs
- NativeCppClassAttribute.cs
- SolidColorBrush.cs
- TimeSpanStorage.cs
- FontSourceCollection.cs
- OrderingQueryOperator.cs
- ColorInterpolationModeValidation.cs
- NameTable.cs
- Renderer.cs
- DesignerActionUIService.cs
- BindingManagerDataErrorEventArgs.cs
- EnumValidator.cs
- PositiveTimeSpanValidatorAttribute.cs