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 / Int32Converter.cs / 1 / 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
- DispatchChannelSink.cs
- EntityModelSchemaGenerator.cs
- XmlCharCheckingReader.cs
- CalendarDesigner.cs
- RsaSecurityKey.cs
- ApplicationTrust.cs
- AuthenticationSection.cs
- TimeSpanMinutesConverter.cs
- TableAdapterManagerNameHandler.cs
- ValueChangedEventManager.cs
- ScriptReferenceEventArgs.cs
- MimeBasePart.cs
- ExpressionBinding.cs
- IPHostEntry.cs
- SortAction.cs
- JsonClassDataContract.cs
- InsufficientMemoryException.cs
- PropertyIDSet.cs
- HelpProvider.cs
- exports.cs
- PointAnimation.cs
- WebReferenceCollection.cs
- XmlWellformedWriter.cs
- AttributeCollection.cs
- KeyPullup.cs
- BatchParser.cs
- SslStream.cs
- login.cs
- DescendantQuery.cs
- ControlType.cs
- OrderedHashRepartitionStream.cs
- ParserHooks.cs
- DecimalStorage.cs
- ClientConfigurationSystem.cs
- DataGridItemCollection.cs
- BaseAsyncResult.cs
- AbsoluteQuery.cs
- StringValidator.cs
- CommonProperties.cs
- DragSelectionMessageFilter.cs
- FilteredDataSetHelper.cs
- ConfigPathUtility.cs
- GeneratedView.cs
- ConnectionProviderAttribute.cs
- GraphicsContainer.cs
- OrderedDictionary.cs
- ConfigPathUtility.cs
- Calendar.cs
- SrgsElement.cs
- ToolStripSplitButton.cs
- Odbc32.cs
- LZCodec.cs
- DocumentPaginator.cs
- FilePrompt.cs
- TextSelectionHelper.cs
- CodeCommentStatement.cs
- AxImporter.cs
- ClientTargetSection.cs
- XmlReaderDelegator.cs
- _UncName.cs
- XmlNode.cs
- PipelineModuleStepContainer.cs
- SmiGettersStream.cs
- DocumentGrid.cs
- VersionedStream.cs
- CounterSample.cs
- InternalConfigEventArgs.cs
- Visual3D.cs
- OracleTransaction.cs
- InstancePersistenceEvent.cs
- XPathDocumentBuilder.cs
- TextEditorContextMenu.cs
- StreamGeometryContext.cs
- ToolBarPanel.cs
- BasicKeyConstraint.cs
- FileDataSourceCache.cs
- DocumentPageViewAutomationPeer.cs
- SoapIncludeAttribute.cs
- VirtualPathProvider.cs
- EdmRelationshipRoleAttribute.cs
- MessageSecurityException.cs
- entityreference_tresulttype.cs
- FixedStringLookup.cs
- cookiecollection.cs
- ValueSerializer.cs
- ObjectRef.cs
- XmlToDatasetMap.cs
- ParserStreamGeometryContext.cs
- SynchronizedPool.cs
- IntersectQueryOperator.cs
- RequestNavigateEventArgs.cs
- XmlHierarchicalEnumerable.cs
- PartialToken.cs
- InvalidCardException.cs
- TextBlockAutomationPeer.cs
- BufferedStream.cs
- PerformanceCounters.cs
- regiisutil.cs
- MediaContextNotificationWindow.cs
- ServiceOperation.cs