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
- VerticalAlignConverter.cs
- ZipIOExtraFieldPaddingElement.cs
- FormViewInsertEventArgs.cs
- HelpInfo.cs
- BitmapEffectOutputConnector.cs
- MenuBindingsEditor.cs
- OdbcConnectionStringbuilder.cs
- filewebresponse.cs
- TargetParameterCountException.cs
- ModifiableIteratorCollection.cs
- PropertyDescriptor.cs
- ReliableOutputSessionChannel.cs
- SafeHGlobalHandleCritical.cs
- CompatibleComparer.cs
- DataSourceXmlClassAttribute.cs
- NewItemsContextMenuStrip.cs
- FontSource.cs
- SchemaTypeEmitter.cs
- CallbackException.cs
- TypeGeneratedEventArgs.cs
- WebPart.cs
- ExternalFile.cs
- HtmlTextViewAdapter.cs
- RenamedEventArgs.cs
- ConfigUtil.cs
- LockRecoveryTask.cs
- Camera.cs
- Model3D.cs
- LongValidatorAttribute.cs
- XmlWrappingWriter.cs
- ResourceReader.cs
- TextChangedEventArgs.cs
- ComponentCollection.cs
- EntitySet.cs
- DataGridViewColumnCollectionDialog.cs
- DynamicQueryableWrapper.cs
- VerificationException.cs
- ServiceHostingEnvironment.cs
- QEncodedStream.cs
- CapabilitiesRule.cs
- HeaderedItemsControl.cs
- NetMsmqSecurityElement.cs
- DataGridHyperlinkColumn.cs
- ControlPager.cs
- DataPagerFieldItem.cs
- XmlSchemaProviderAttribute.cs
- PngBitmapDecoder.cs
- LocatorPartList.cs
- NavigationProperty.cs
- PerformanceCounter.cs
- SoapConverter.cs
- HScrollProperties.cs
- WebPartVerb.cs
- SerialReceived.cs
- DataGridViewUtilities.cs
- HtmlContainerControl.cs
- AttachedAnnotationChangedEventArgs.cs
- RangeValueProviderWrapper.cs
- Crc32Helper.cs
- WebServiceData.cs
- ThaiBuddhistCalendar.cs
- GridViewColumn.cs
- ExtensionQuery.cs
- MediaTimeline.cs
- mactripleDES.cs
- PointAnimationUsingKeyFrames.cs
- StringExpressionSet.cs
- SynchronizedInputAdaptor.cs
- Clipboard.cs
- FileEnumerator.cs
- SecurityValidationBehavior.cs
- Encoder.cs
- SoapSchemaExporter.cs
- LicenseProviderAttribute.cs
- QilDataSource.cs
- HorizontalAlignConverter.cs
- Stack.cs
- HtmlTableCell.cs
- Padding.cs
- EntityDataSourceMemberPath.cs
- XslTransform.cs
- UserControlBuildProvider.cs
- BaseProcessProtocolHandler.cs
- UrlMapping.cs
- BehaviorEditorPart.cs
- FunctionImportElement.cs
- FixedSOMSemanticBox.cs
- SerializationStore.cs
- SqlDataSourceView.cs
- DataGridViewDataConnection.cs
- WizardPanelChangingEventArgs.cs
- RuntimeHelpers.cs
- ColorTranslator.cs
- DataGridViewRowStateChangedEventArgs.cs
- CreateRefExpr.cs
- WebSysDisplayNameAttribute.cs
- EnumerableRowCollection.cs
- IndicFontClient.cs
- ColumnReorderedEventArgs.cs
- ItemTypeToolStripMenuItem.cs