Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- NTAccount.cs
- PersonalizationProviderHelper.cs
- AssemblySettingAttributes.cs
- TransformGroup.cs
- ScriptResourceDefinition.cs
- SqlDataRecord.cs
- BooleanKeyFrameCollection.cs
- DataGridCommandEventArgs.cs
- ModuleConfigurationInfo.cs
- DataTable.cs
- GetPageNumberCompletedEventArgs.cs
- CFStream.cs
- HwndAppCommandInputProvider.cs
- PassportIdentity.cs
- StylusDownEventArgs.cs
- CheckBoxRenderer.cs
- WithStatement.cs
- NavigateEvent.cs
- ConfigUtil.cs
- TemplateControl.cs
- AuthenticationModulesSection.cs
- DomNameTable.cs
- WebPartConnectionsCancelEventArgs.cs
- WSDualHttpSecurityMode.cs
- DesignerDataRelationship.cs
- UIElementParaClient.cs
- StsCommunicationException.cs
- NominalTypeEliminator.cs
- ValidationResult.cs
- TemplateComponentConnector.cs
- PermissionSetTriple.cs
- WebHttpBindingCollectionElement.cs
- ConfigurationLoaderException.cs
- PartBasedPackageProperties.cs
- FileLevelControlBuilderAttribute.cs
- JsonQueryStringConverter.cs
- ListBoxItemAutomationPeer.cs
- DispatcherFrame.cs
- XslTransform.cs
- TiffBitmapEncoder.cs
- PenLineJoinValidation.cs
- FormsAuthenticationCredentials.cs
- RNGCryptoServiceProvider.cs
- HealthMonitoringSection.cs
- TableItemStyle.cs
- ReflectTypeDescriptionProvider.cs
- AxWrapperGen.cs
- securitycriticaldataformultiplegetandset.cs
- SoapParser.cs
- PolyLineSegmentFigureLogic.cs
- IntranetCredentialPolicy.cs
- GetReadStreamResult.cs
- DataListCommandEventArgs.cs
- CompoundFileDeflateTransform.cs
- PolicyStatement.cs
- ModuleBuilder.cs
- SslStream.cs
- WorkflowInstanceTerminatedRecord.cs
- OpenFileDialog.cs
- OdbcRowUpdatingEvent.cs
- Transform3D.cs
- ItemDragEvent.cs
- RouteCollection.cs
- CSharpCodeProvider.cs
- DefaultPerformanceCounters.cs
- HttpRuntimeSection.cs
- ClientTargetSection.cs
- XmlFormatWriterGenerator.cs
- Maps.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ZoomingMessageFilter.cs
- ProviderUtil.cs
- DetailsViewDeleteEventArgs.cs
- EdmTypeAttribute.cs
- GB18030Encoding.cs
- Timer.cs
- XmlLinkedNode.cs
- Cursors.cs
- WebPartVerb.cs
- dbdatarecord.cs
- UITypeEditor.cs
- ImageSourceConverter.cs
- AuthenticateEventArgs.cs
- OutputCacheSection.cs
- TraceSource.cs
- DataTableNameHandler.cs
- StateMachineHelpers.cs
- Pointer.cs
- IconConverter.cs
- CodeSnippetExpression.cs
- parserscommon.cs
- DataColumnCollection.cs
- Rect.cs
- FaultCode.cs
- __FastResourceComparer.cs
- TemplateNameScope.cs
- HttpCookieCollection.cs
- cache.cs
- unitconverter.cs
- HttpModule.cs