Code:
/ 4.0 / 4.0 / 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; ////// [HostProtection(SharedState = true)] public class Int64Converter : BaseNumberConverter { ///Provides a type converter to convert 64-bit signed integer objects to and /// from various other representations. ////// 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; ////// [HostProtection(SharedState = true)] public class Int64Converter : BaseNumberConverter { ///Provides a type converter to convert 64-bit signed integer objects to and /// from various other representations. ////// 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
- MetadataImporterQuotas.cs
- AdornerPresentationContext.cs
- HttpFileCollection.cs
- sqlpipe.cs
- FixedDocumentSequencePaginator.cs
- ValuePatternIdentifiers.cs
- LambdaCompiler.Generated.cs
- IPAddress.cs
- SmtpTransport.cs
- RawStylusSystemGestureInputReport.cs
- Util.cs
- validation.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- CodePropertyReferenceExpression.cs
- ObjectQueryExecutionPlan.cs
- Int16Animation.cs
- FaultException.cs
- ConfigXmlAttribute.cs
- TemplateNameScope.cs
- XmlHierarchyData.cs
- HttpUnhandledOperationInvoker.cs
- BevelBitmapEffect.cs
- CheckBoxField.cs
- SpeakCompletedEventArgs.cs
- FlatButtonAppearance.cs
- HostingEnvironment.cs
- AggregationMinMaxHelpers.cs
- FormViewDeletedEventArgs.cs
- TcpAppDomainProtocolHandler.cs
- ContractCodeDomInfo.cs
- SymbolType.cs
- baseaxisquery.cs
- PointIndependentAnimationStorage.cs
- SoapEnumAttribute.cs
- ValidatorCompatibilityHelper.cs
- SurrogateSelector.cs
- PageSettings.cs
- SoapCodeExporter.cs
- LinqDataSource.cs
- CommandValueSerializer.cs
- SubMenuStyleCollection.cs
- XamlDesignerSerializationManager.cs
- DataServiceQueryException.cs
- ContentFileHelper.cs
- ImageSource.cs
- HtmlTableRow.cs
- PermissionListSet.cs
- ImageFormatConverter.cs
- Inline.cs
- Util.cs
- X509CertificateRecipientClientCredential.cs
- CollectionConverter.cs
- SingleTagSectionHandler.cs
- InkCanvasSelectionAdorner.cs
- SoapSchemaMember.cs
- TextViewSelectionProcessor.cs
- HostingPreferredMapPath.cs
- StrongNameKeyPair.cs
- RuntimeConfig.cs
- Privilege.cs
- TemplateContentLoader.cs
- XmlSchemaObjectTable.cs
- DtrList.cs
- SmiEventStream.cs
- CodeDomComponentSerializationService.cs
- DataSpaceManager.cs
- DPAPIProtectedConfigurationProvider.cs
- GridViewRowCollection.cs
- PaperSource.cs
- BinaryMethodMessage.cs
- DbProviderConfigurationHandler.cs
- SmtpFailedRecipientsException.cs
- FunctionGenerator.cs
- DocumentViewerBaseAutomationPeer.cs
- ImmutablePropertyDescriptorGridEntry.cs
- MergeLocalizationDirectives.cs
- Main.cs
- SrgsSemanticInterpretationTag.cs
- DecodeHelper.cs
- CommonProperties.cs
- BookmarkScopeInfo.cs
- NumberFunctions.cs
- XsdBuildProvider.cs
- InstanceData.cs
- XmlIgnoreAttribute.cs
- HttpAsyncResult.cs
- ArraySegment.cs
- HeaderPanel.cs
- AssemblyBuilder.cs
- milexports.cs
- MultiPageTextView.cs
- ServiceInfo.cs
- Win32MouseDevice.cs
- HtmlHistory.cs
- ValidatorCompatibilityHelper.cs
- ParentUndoUnit.cs
- XmlBinaryWriterSession.cs
- SByte.cs
- AutoGeneratedField.cs
- ObfuscationAttribute.cs