Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Int32Converter.cs / 1305376 / Int32Converter.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 Int32Converter : BaseNumberConverter { ///Provides a type converter to convert 32-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(Int32); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToInt32(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Int32.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 Int32.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Int32)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 Int32Converter : BaseNumberConverter { ///Provides a type converter to convert 32-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(Int32); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToInt32(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Int32.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 Int32.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Int32)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
- FramingFormat.cs
- ISAPIApplicationHost.cs
- GridViewSortEventArgs.cs
- ThreadStateException.cs
- InkSerializer.cs
- OdbcException.cs
- EndPoint.cs
- FontWeight.cs
- _CacheStreams.cs
- CommandHelper.cs
- OrthographicCamera.cs
- TypeName.cs
- OperationInfo.cs
- TrackingAnnotationCollection.cs
- Calendar.cs
- ValidationVisibilityAttribute.cs
- ParsedAttributeCollection.cs
- DataGridViewColumnCollectionEditor.cs
- DbProviderFactories.cs
- Configuration.cs
- ListBoxItemWrapperAutomationPeer.cs
- SafeFileMappingHandle.cs
- pingexception.cs
- FileEnumerator.cs
- BoundColumn.cs
- ShaderRenderModeValidation.cs
- ClientSettings.cs
- FixedLineResult.cs
- IssuedTokenClientElement.cs
- X509Utils.cs
- MouseActionConverter.cs
- Vector3DAnimationBase.cs
- ImageListUtils.cs
- ListItemConverter.cs
- AudioException.cs
- ManifestSignatureInformation.cs
- PermissionSet.cs
- TextRangeProviderWrapper.cs
- BasePropertyDescriptor.cs
- InputReportEventArgs.cs
- XmlWriterSettings.cs
- EncodingTable.cs
- MatrixCamera.cs
- DataGridColumnStyleMappingNameEditor.cs
- DependencyObject.cs
- RequestCacheValidator.cs
- WebEventTraceProvider.cs
- SelectedDatesCollection.cs
- Inflater.cs
- TextEffect.cs
- FormViewDesigner.cs
- TabControlEvent.cs
- WebBrowserDocumentCompletedEventHandler.cs
- GridErrorDlg.cs
- HttpWrapper.cs
- xmlsaver.cs
- SqlDataSourceCache.cs
- MenuItemStyle.cs
- SByteConverter.cs
- DataGridViewComboBoxColumn.cs
- HttpCapabilitiesSectionHandler.cs
- Condition.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- BindingSource.cs
- CaseInsensitiveOrdinalStringComparer.cs
- Recipient.cs
- SoapElementAttribute.cs
- ForwardPositionQuery.cs
- SortQuery.cs
- SchemaImporterExtension.cs
- HealthMonitoringSection.cs
- MatrixAnimationBase.cs
- BufferedWebEventProvider.cs
- CharUnicodeInfo.cs
- FilteredDataSetHelper.cs
- DisplayMemberTemplateSelector.cs
- ThaiBuddhistCalendar.cs
- GeneratedView.cs
- SqlExpander.cs
- OptimisticConcurrencyException.cs
- BinaryParser.cs
- DataPager.cs
- SchemaTableColumn.cs
- AnnotationAdorner.cs
- SoapAttributes.cs
- HashCodeCombiner.cs
- WeakReferenceEnumerator.cs
- NonVisualControlAttribute.cs
- RoutedEventValueSerializer.cs
- InkCanvasFeedbackAdorner.cs
- QueueProcessor.cs
- DataColumn.cs
- EntityDataSourceWrapperCollection.cs
- ExeConfigurationFileMap.cs
- Wildcard.cs
- XsltArgumentList.cs
- ConstructorExpr.cs
- EraserBehavior.cs
- SapiRecognizer.cs
- SqlLiftWhereClauses.cs