Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / Int64Converter.cs / 1 / 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.
//------------------------------------------------------------------------------
//
// 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
- XmlSchemaObject.cs
- Mapping.cs
- CommandValueSerializer.cs
- Base64Encoder.cs
- LinqDataSourceContextEventArgs.cs
- SystemColorTracker.cs
- XamlSerializer.cs
- HtmlEmptyTagControlBuilder.cs
- DataPointer.cs
- ContextMenuStrip.cs
- webproxy.cs
- InvokePattern.cs
- _PooledStream.cs
- ClientSettingsProvider.cs
- ChtmlImageAdapter.cs
- UIElementParagraph.cs
- SchemaImporterExtensionElement.cs
- QuarticEase.cs
- GridViewColumn.cs
- AppDomainManager.cs
- DataBindingList.cs
- AssemblySettingAttributes.cs
- NamespaceInfo.cs
- StrongNameSignatureInformation.cs
- DataServiceOperationContext.cs
- TranslateTransform3D.cs
- CollectionBase.cs
- ToolboxDataAttribute.cs
- AccessDataSource.cs
- DesignerAttributeInfo.cs
- RectAnimationUsingKeyFrames.cs
- AppDomainAttributes.cs
- RoleGroup.cs
- DecimalKeyFrameCollection.cs
- EventLogEntry.cs
- PositiveTimeSpanValidatorAttribute.cs
- SlotInfo.cs
- ComEventsInfo.cs
- SelectionProviderWrapper.cs
- DataServiceProcessingPipelineEventArgs.cs
- IChannel.cs
- CompositeFontParser.cs
- SystemException.cs
- RouteParser.cs
- SqlConnectionFactory.cs
- PersonalizationStateQuery.cs
- Utilities.cs
- XamlRtfConverter.cs
- NoResizeHandleGlyph.cs
- ToolboxComponentsCreatingEventArgs.cs
- ObjectParameter.cs
- FlagsAttribute.cs
- entityreference_tresulttype.cs
- IProducerConsumerCollection.cs
- InfiniteIntConverter.cs
- SubMenuStyle.cs
- DefaultHttpHandler.cs
- Expressions.cs
- HMACSHA1.cs
- PixelFormats.cs
- OdbcConnectionHandle.cs
- CalendarDay.cs
- Socket.cs
- StyleXamlTreeBuilder.cs
- XpsResource.cs
- Line.cs
- EncodingTable.cs
- ObjectIDGenerator.cs
- DataGridAddNewRow.cs
- DataTableMapping.cs
- Quaternion.cs
- FlowDocumentFormatter.cs
- ClientFormsIdentity.cs
- Effect.cs
- DataRowChangeEvent.cs
- ChannelServices.cs
- MediaPlayerState.cs
- TextBox.cs
- DataGridViewToolTip.cs
- TogglePattern.cs
- ChameleonKey.cs
- TextView.cs
- EmissiveMaterial.cs
- SQLDoubleStorage.cs
- Rijndael.cs
- Size3DValueSerializer.cs
- hresults.cs
- URLMembershipCondition.cs
- SchemaElementLookUpTableEnumerator.cs
- EventHandlersDesigner.cs
- X500Name.cs
- ServiceParser.cs
- StatusBar.cs
- VirtualDirectoryMappingCollection.cs
- SemanticResolver.cs
- DataServiceProviderWrapper.cs
- LogSwitch.cs
- AnimationTimeline.cs
- FocusWithinProperty.cs
- DesignerCommandAdapter.cs