Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ByteStreamGeometryContext.cs
- InterleavedZipPartStream.cs
- RepeatButton.cs
- ActivityDefaults.cs
- FrameworkReadOnlyPropertyMetadata.cs
- AppSettingsExpressionBuilder.cs
- SimpleApplicationHost.cs
- DriveNotFoundException.cs
- Size3D.cs
- Renderer.cs
- PrintingPermission.cs
- XPathNodeList.cs
- FlowDocumentReaderAutomationPeer.cs
- RelatedCurrencyManager.cs
- WorkflowItemsPresenter.cs
- PeerInvitationResponse.cs
- CacheOutputQuery.cs
- HtmlTableCellCollection.cs
- SecurityKeyType.cs
- IApplicationTrustManager.cs
- RedistVersionInfo.cs
- DrawingContextDrawingContextWalker.cs
- MergePropertyDescriptor.cs
- ScriptManagerProxy.cs
- AppDomainFactory.cs
- MimeTextImporter.cs
- PrintDialogException.cs
- ObjectMemberMapping.cs
- DataContractJsonSerializer.cs
- ArgIterator.cs
- TimelineCollection.cs
- HelpOperationInvoker.cs
- WinEventWrap.cs
- MD5.cs
- RegexRunnerFactory.cs
- TdsRecordBufferSetter.cs
- NullableConverter.cs
- StylusPlugin.cs
- AsyncResult.cs
- UnknownWrapper.cs
- SystemGatewayIPAddressInformation.cs
- BookmarkScope.cs
- DeclarativeCatalogPartDesigner.cs
- RawStylusInputReport.cs
- DetailsViewRow.cs
- CacheMode.cs
- BitmapPalette.cs
- FrameworkContentElement.cs
- DataContractSet.cs
- CompilerScopeManager.cs
- IMembershipProvider.cs
- PropertyGridEditorPart.cs
- OleDbCommandBuilder.cs
- InvalidOleVariantTypeException.cs
- TokenBasedSet.cs
- WebPartConnection.cs
- DataPagerFieldCollection.cs
- SqlParameter.cs
- DockProviderWrapper.cs
- ExpandoClass.cs
- DataGridViewRowPostPaintEventArgs.cs
- ContextStaticAttribute.cs
- Directory.cs
- TextTabProperties.cs
- DiscreteKeyFrames.cs
- SuppressMergeCheckAttribute.cs
- EdmComplexPropertyAttribute.cs
- WCFServiceClientProxyGenerator.cs
- ProfileInfo.cs
- ListInitExpression.cs
- SoapEnvelopeProcessingElement.cs
- TypeSystemHelpers.cs
- DBSqlParser.cs
- AuthorizationRuleCollection.cs
- XmlSchemaSimpleType.cs
- Line.cs
- FileUtil.cs
- OdbcError.cs
- ComponentEditorPage.cs
- DSACryptoServiceProvider.cs
- AssociationTypeEmitter.cs
- Unit.cs
- DataTableCollection.cs
- MissingSatelliteAssemblyException.cs
- InputChannelAcceptor.cs
- RootBrowserWindowProxy.cs
- UnmanagedMemoryStream.cs
- ResXResourceWriter.cs
- FixUp.cs
- PerformanceCounterPermissionAttribute.cs
- SoapSchemaMember.cs
- DataControlImageButton.cs
- CharEntityEncoderFallback.cs
- Menu.cs
- ApplicationSettingsBase.cs
- ColorConvertedBitmap.cs
- Transform3DGroup.cs
- EntitySqlQueryCacheEntry.cs
- Point3DConverter.cs
- recordstate.cs