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
- MetadataUtil.cs
- XmlSerializerSection.cs
- MonthCalendarDesigner.cs
- EntityClientCacheEntry.cs
- DoubleLinkList.cs
- IOException.cs
- TransactionFilter.cs
- ExpressionWriter.cs
- DataGridViewToolTip.cs
- SqlClientPermission.cs
- Currency.cs
- BitmapFrameEncode.cs
- FormCollection.cs
- UserControl.cs
- ObjectDataSourceView.cs
- ValidationPropertyAttribute.cs
- IDReferencePropertyAttribute.cs
- AddInProcess.cs
- AuthorizationSection.cs
- PixelShader.cs
- TableCellCollection.cs
- OneToOneMappingSerializer.cs
- TraceSource.cs
- CellTreeNodeVisitors.cs
- JsonFormatReaderGenerator.cs
- XmlSchemaProviderAttribute.cs
- GorillaCodec.cs
- FontUnitConverter.cs
- TemplateEditingService.cs
- PaintValueEventArgs.cs
- XmlMapping.cs
- DbParameterCollection.cs
- CellPartitioner.cs
- SqlDataSourceFilteringEventArgs.cs
- BrushMappingModeValidation.cs
- GenericFlowSwitchHelper.cs
- CurrencyManager.cs
- CultureInfoConverter.cs
- XmlSchemas.cs
- WebException.cs
- StringToken.cs
- HttpWriter.cs
- _FtpDataStream.cs
- WorkflowStateRollbackService.cs
- EpmCustomContentDeSerializer.cs
- FtpRequestCacheValidator.cs
- TargetInvocationException.cs
- QilBinary.cs
- List.cs
- CodeTypeMember.cs
- CurrencyManager.cs
- SSmlParser.cs
- CodeSnippetTypeMember.cs
- CompositeControl.cs
- TaiwanLunisolarCalendar.cs
- TTSVoice.cs
- ActivityExecutorDelegateInfo.cs
- TextTabProperties.cs
- coordinator.cs
- ConfigurationSettings.cs
- AssertHelper.cs
- DesignerActionMethodItem.cs
- ValueQuery.cs
- AffineTransform3D.cs
- OleDbInfoMessageEvent.cs
- HttpsHostedTransportConfiguration.cs
- Int32Storage.cs
- ColumnReorderedEventArgs.cs
- CngProvider.cs
- Object.cs
- SymmetricAlgorithm.cs
- BuildProvider.cs
- RuleRef.cs
- Rect3D.cs
- processwaithandle.cs
- UIAgentAsyncBeginRequest.cs
- CalloutQueueItem.cs
- PackageRelationship.cs
- SafeHandles.cs
- TraceInternal.cs
- CounterCreationDataCollection.cs
- Form.cs
- OleDbReferenceCollection.cs
- BCryptHashAlgorithm.cs
- SubMenuStyleCollection.cs
- AnnotationAdorner.cs
- RpcAsyncResult.cs
- ConfigXmlElement.cs
- sqlpipe.cs
- MdiWindowListItemConverter.cs
- BrowserCapabilitiesFactoryBase.cs
- HasCopySemanticsAttribute.cs
- XmlExtensionFunction.cs
- IOThreadTimer.cs
- XamlSerializerUtil.cs
- WindowsHyperlink.cs
- MgmtResManager.cs
- ParallelRangeManager.cs
- WorkerRequest.cs
- coordinatorfactory.cs