Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DoubleConverter.cs / 1305376 / DoubleConverter.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 DoubleConverter : BaseNumberConverter { ///Provides a type /// converter to convert double-precision, floating point number objects to and from various /// other representations. ////// Determines whether this editor will attempt to convert hex (0x or #) strings /// internal override bool AllowHex { get { return false; } } ////// The Type this converter is targeting (e.g. Int16, UInt32, etc.) /// internal override Type TargetType { get { return typeof(Double); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToDouble(value, CultureInfo.CurrentCulture); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Double.Parse(value, NumberStyles.Float, formatInfo); } ////// Convert the given value to a string using the given CultureInfo /// internal override object FromString(string value, CultureInfo culture){ return Double.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Double)value).ToString("R", 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
- EntityType.cs
- EntityContainer.cs
- AuthenticationModuleElementCollection.cs
- ScrollViewer.cs
- ItemContainerProviderWrapper.cs
- OleStrCAMarshaler.cs
- EntityDataSourceReferenceGroup.cs
- CommonRemoteMemoryBlock.cs
- InputScopeConverter.cs
- RotateTransform3D.cs
- compensatingcollection.cs
- SqlAggregateChecker.cs
- ServerType.cs
- MemoryRecordBuffer.cs
- FormsAuthenticationCredentials.cs
- UTF32Encoding.cs
- PeerNeighborManager.cs
- SimpleParser.cs
- DataGridViewBand.cs
- BordersPage.cs
- ByteAnimationBase.cs
- VariableQuery.cs
- ObjectItemLoadingSessionData.cs
- RangeBase.cs
- AdvancedBindingPropertyDescriptor.cs
- FixedTextView.cs
- ObjectReaderCompiler.cs
- Color.cs
- CustomErrorCollection.cs
- ClosableStream.cs
- ConfigurationSettings.cs
- ModuleConfigurationInfo.cs
- ManualResetEvent.cs
- DefaultTextStore.cs
- LayoutInformation.cs
- TextInfo.cs
- RegexInterpreter.cs
- OperationResponse.cs
- FontDifferentiator.cs
- Transform3DGroup.cs
- Models.cs
- ColorConvertedBitmapExtension.cs
- NavigationPropertyAccessor.cs
- SoapAttributes.cs
- _AutoWebProxyScriptHelper.cs
- DeferredSelectedIndexReference.cs
- Send.cs
- DependencyPropertyKind.cs
- ScheduleChanges.cs
- DataViewManager.cs
- DictationGrammar.cs
- SqlCacheDependencySection.cs
- OperationAbortedException.cs
- MailMessage.cs
- PackageStore.cs
- ReturnValue.cs
- DatasetMethodGenerator.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- InheritanceAttribute.cs
- EventWaitHandleSecurity.cs
- DropDownHolder.cs
- CatalogZoneBase.cs
- MetafileHeaderWmf.cs
- LogicalTreeHelper.cs
- ApplicationServiceHelper.cs
- SerialErrors.cs
- Variable.cs
- DesignerLoader.cs
- GeometryGroup.cs
- KeyFrames.cs
- FunctionNode.cs
- ConnectionPointCookie.cs
- AutoResetEvent.cs
- MultipleViewPattern.cs
- TextEncodedRawTextWriter.cs
- StylusTip.cs
- DataTableExtensions.cs
- Internal.cs
- CrossSiteScriptingValidation.cs
- ExcludePathInfo.cs
- assemblycache.cs
- StylusCaptureWithinProperty.cs
- DeviceContexts.cs
- EdmComplexTypeAttribute.cs
- ObjectListShowCommandsEventArgs.cs
- TypeBuilder.cs
- MaterialCollection.cs
- Int16KeyFrameCollection.cs
- TextSyndicationContent.cs
- IssuanceLicense.cs
- DocumentOrderComparer.cs
- RuleRef.cs
- Matrix.cs
- Funcletizer.cs
- FacetEnabledSchemaElement.cs
- HyperLinkColumn.cs
- ListCollectionView.cs
- SqlDataSourceConfigureSortForm.cs
- SelectionHighlightInfo.cs
- FormatVersion.cs