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
- CanExpandCollapseAllConverter.cs
- ConnectionProviderAttribute.cs
- TableLayoutPanel.cs
- ParserStreamGeometryContext.cs
- SafeViewOfFileHandle.cs
- HtmlControl.cs
- TimeStampChecker.cs
- X509Extension.cs
- RectAnimation.cs
- TemplateBuilder.cs
- SmiMetaData.cs
- UnauthorizedWebPart.cs
- EndEvent.cs
- MemberNameValidator.cs
- SimpleBitVector32.cs
- WorkflowInspectionServices.cs
- AncestorChangedEventArgs.cs
- Cursors.cs
- DatePickerDateValidationErrorEventArgs.cs
- ConfigurationErrorsException.cs
- WebPartConnectionsConnectVerb.cs
- CompositionDesigner.cs
- dataobject.cs
- PriorityItem.cs
- DigestTraceRecordHelper.cs
- StylusCollection.cs
- Collection.cs
- _HTTPDateParse.cs
- KeyEventArgs.cs
- UiaCoreTypesApi.cs
- DataSourceViewSchemaConverter.cs
- DataGridViewAddColumnDialog.cs
- DefaultTextStoreTextComposition.cs
- ArrayTypeMismatchException.cs
- TextBlock.cs
- MultiAsyncResult.cs
- SortableBindingList.cs
- TdsRecordBufferSetter.cs
- DateTimeValueSerializerContext.cs
- FormsAuthenticationConfiguration.cs
- StylusSystemGestureEventArgs.cs
- HybridObjectCache.cs
- SurrogateSelector.cs
- VoiceSynthesis.cs
- ADMembershipProvider.cs
- TextRenderer.cs
- RequestCachingSection.cs
- GatewayIPAddressInformationCollection.cs
- UndoUnit.cs
- PageThemeBuildProvider.cs
- RegexWriter.cs
- DBSqlParserColumnCollection.cs
- ResourcePool.cs
- Vector3DAnimation.cs
- TypeBuilder.cs
- HtmlLink.cs
- MemberPath.cs
- AttachedAnnotationChangedEventArgs.cs
- MergePropertyDescriptor.cs
- DataSourceControlBuilder.cs
- EntityCommandDefinition.cs
- WindowsBrush.cs
- SqlFileStream.cs
- ToolStripItemEventArgs.cs
- SevenBitStream.cs
- KeyTimeConverter.cs
- SystemKeyConverter.cs
- RegexGroup.cs
- NativeMethods.cs
- TextServicesManager.cs
- WebServiceMethodData.cs
- SmiContext.cs
- PerfCounters.cs
- GeneralTransform3D.cs
- RTTypeWrapper.cs
- TemplatedMailWebEventProvider.cs
- BitmapSizeOptions.cs
- ControlBindingsCollection.cs
- MailWebEventProvider.cs
- Label.cs
- SchemaCollectionCompiler.cs
- DataGridViewCheckBoxColumn.cs
- DispatcherHookEventArgs.cs
- ScriptingScriptResourceHandlerSection.cs
- RequestTimeoutManager.cs
- BamlLocalizableResourceKey.cs
- TimeSpanConverter.cs
- InsufficientExecutionStackException.cs
- ColumnTypeConverter.cs
- SrgsRule.cs
- IisTraceListener.cs
- SQlBooleanStorage.cs
- AuthenticationManager.cs
- NGCSerializerAsync.cs
- TemplateKey.cs
- PassportIdentity.cs
- Attachment.cs
- SqlIdentifier.cs
- Vector3D.cs
- PixelFormat.cs