Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / UInt32Converter.cs / 1305376 / UInt32Converter.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 UInt32Converter : BaseNumberConverter { ///Provides a type converter to convert 32-bit unsigned 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(UInt32); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToUInt32(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return UInt32.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 UInt32.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((UInt32)value).ToString("G", formatInfo); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// 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 UInt32Converter : BaseNumberConverter { ///Provides a type converter to convert 32-bit unsigned 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(UInt32); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToUInt32(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return UInt32.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 UInt32.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((UInt32)value).ToString("G", formatInfo); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ProfilePropertySettings.cs
- XmlSerializationGeneratedCode.cs
- XmlSubtreeReader.cs
- Repeater.cs
- TableRowsCollectionEditor.cs
- AlternateViewCollection.cs
- VisualTreeUtils.cs
- WsatTransactionHeader.cs
- AuthenticationSchemesHelper.cs
- TextServicesDisplayAttributePropertyRanges.cs
- EventRoute.cs
- EmptyReadOnlyDictionaryInternal.cs
- InternalSendMessage.cs
- PageCache.cs
- WindowsFormsSynchronizationContext.cs
- SByte.cs
- BinaryObjectWriter.cs
- XmlEncoding.cs
- DataListItemCollection.cs
- ReferenceService.cs
- AppDomainAttributes.cs
- BlobPersonalizationState.cs
- PropertyNames.cs
- ActivityBindForm.cs
- DataViewSettingCollection.cs
- VisualProxy.cs
- EncryptedPackageFilter.cs
- OuterGlowBitmapEffect.cs
- OleDbException.cs
- COM2ICategorizePropertiesHandler.cs
- HttpCachePolicy.cs
- WorkflowIdleElement.cs
- TypeConverterHelper.cs
- MULTI_QI.cs
- FontCacheLogic.cs
- MetaData.cs
- MbpInfo.cs
- GridViewRowPresenterBase.cs
- LinearQuaternionKeyFrame.cs
- EntityProviderFactory.cs
- Identifier.cs
- GetPageCompletedEventArgs.cs
- SqlVersion.cs
- CollectionViewGroupInternal.cs
- smtppermission.cs
- SafeProcessHandle.cs
- ActivityCodeDomSerializationManager.cs
- FlowDocument.cs
- XPathSelectionIterator.cs
- PropertyFilterAttribute.cs
- ASCIIEncoding.cs
- OverrideMode.cs
- DataControlExtensions.cs
- Rect3DConverter.cs
- WindowsHyperlink.cs
- DBConnectionString.cs
- XmlSchemaComplexType.cs
- ContextStaticAttribute.cs
- DataGridViewLayoutData.cs
- CqlLexerHelpers.cs
- EventDriven.cs
- userdatakeys.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ClientFormsAuthenticationCredentials.cs
- GenericEnumConverter.cs
- OledbConnectionStringbuilder.cs
- BamlBinaryReader.cs
- Interlocked.cs
- uribuilder.cs
- GridViewColumnHeader.cs
- StorageScalarPropertyMapping.cs
- DeferredBinaryDeserializerExtension.cs
- CompositionTarget.cs
- DataDocumentXPathNavigator.cs
- TypeGenericEnumerableViewSchema.cs
- ColorConvertedBitmapExtension.cs
- IIS7UserPrincipal.cs
- FixedDocumentSequencePaginator.cs
- WindowsListViewSubItem.cs
- NetMsmqSecurity.cs
- KnownTypesHelper.cs
- DataObject.cs
- ISAPIRuntime.cs
- EntityDataSourceUtil.cs
- Rect3DConverter.cs
- ImageSource.cs
- CodeRegionDirective.cs
- TransactedBatchingElement.cs
- Matrix.cs
- ObjectHandle.cs
- InternalBufferOverflowException.cs
- ButtonStandardAdapter.cs
- ILGenerator.cs
- DesignTimeHTMLTextWriter.cs
- VirtualDirectoryMapping.cs
- RefreshEventArgs.cs
- SignatureToken.cs
- EtwTrackingParticipant.cs
- XmlEntityReference.cs
- ExtentKey.cs