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
- DataGridViewColumnCollection.cs
- DataGridViewSelectedCellCollection.cs
- Typography.cs
- TreeNodeBindingCollection.cs
- SimpleHandlerBuildProvider.cs
- WebExceptionStatus.cs
- ServiceBuildProvider.cs
- PersistStreamTypeWrapper.cs
- RemotingServices.cs
- LifetimeMonitor.cs
- XmlTextEncoder.cs
- XamlLoadErrorInfo.cs
- XmlCollation.cs
- DynamicResourceExtension.cs
- ChtmlImageAdapter.cs
- DataTableCollection.cs
- KeyedHashAlgorithm.cs
- DecimalMinMaxAggregationOperator.cs
- FeatureSupport.cs
- PersistenceProviderFactory.cs
- TableRow.cs
- WebPartConnectionCollection.cs
- TypeHelpers.cs
- ResourcesGenerator.cs
- HttpCookiesSection.cs
- CurrencyWrapper.cs
- LocationReference.cs
- WebServicesInteroperability.cs
- DataGridViewDesigner.cs
- PasswordValidationException.cs
- CodeGenerator.cs
- DetailsViewUpdateEventArgs.cs
- DebugView.cs
- DependencyObjectPropertyDescriptor.cs
- InputMethod.cs
- EventBuilder.cs
- EmptyStringExpandableObjectConverter.cs
- DataIdProcessor.cs
- SafeNativeMethods.cs
- httpserverutility.cs
- DataBindingList.cs
- SelectionService.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- CultureTableRecord.cs
- SQLInt32Storage.cs
- PointHitTestResult.cs
- DataServiceBehavior.cs
- ClockController.cs
- SafeCryptContextHandle.cs
- XmlSignificantWhitespace.cs
- DefaultAutoFieldGenerator.cs
- Stream.cs
- PriorityBindingExpression.cs
- GPRECTF.cs
- BrushConverter.cs
- SoapFault.cs
- LingerOption.cs
- SecurityVerifiedMessage.cs
- SchemaElementDecl.cs
- IsolationInterop.cs
- WindowsTitleBar.cs
- SystemParameters.cs
- HtmlElement.cs
- WindowsFormsHost.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- Soap.cs
- MetaModel.cs
- MenuItemBindingCollection.cs
- prefixendpointaddressmessagefilter.cs
- WebServiceFault.cs
- ChannelTraceRecord.cs
- XmlCDATASection.cs
- QuaternionAnimationBase.cs
- SubstitutionList.cs
- DataServiceQueryContinuation.cs
- ArgumentNullException.cs
- XmlDataProvider.cs
- TextTreeTextNode.cs
- ApplicationTrust.cs
- Configuration.cs
- MimeBasePart.cs
- StringOutput.cs
- Matrix3DStack.cs
- XPathException.cs
- Hashtable.cs
- ScriptControl.cs
- PageBuildProvider.cs
- ClientScriptManager.cs
- DocumentEventArgs.cs
- SqlTrackingWorkflowInstance.cs
- ObjectAssociationEndMapping.cs
- TextEffect.cs
- FileStream.cs
- LoggedException.cs
- XmlSchemaProviderAttribute.cs
- BitmapDecoder.cs
- XDeferredAxisSource.cs
- AsymmetricSignatureFormatter.cs
- SmiRequestExecutor.cs
- XmlAttributeOverrides.cs