Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / UInt32Converter.cs / 1 / 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
- IdentitySection.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- _ListenerRequestStream.cs
- ListViewItem.cs
- IndicFontClient.cs
- HashCryptoHandle.cs
- COM2ICategorizePropertiesHandler.cs
- FormsAuthenticationConfiguration.cs
- IPHostEntry.cs
- MethodBody.cs
- TypeUnloadedException.cs
- SiteMapNode.cs
- HitTestWithGeometryDrawingContextWalker.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- DiscoveryClientElement.cs
- ContextBase.cs
- EntityRecordInfo.cs
- HttpException.cs
- FormsIdentity.cs
- BindingList.cs
- MenuItem.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- FontFamily.cs
- PropertyExpression.cs
- FontInfo.cs
- PinnedBufferMemoryStream.cs
- ObsoleteAttribute.cs
- _TransmitFileOverlappedAsyncResult.cs
- CultureInfoConverter.cs
- RC2.cs
- VersionPair.cs
- Operators.cs
- XmlSchemaRedefine.cs
- CheckBoxField.cs
- ModelTreeEnumerator.cs
- TreeNodeCollection.cs
- SerialPinChanges.cs
- SqlConnection.cs
- sqlpipe.cs
- SettingsPropertyValue.cs
- TabPage.cs
- DecimalAnimation.cs
- WebPartConnectVerb.cs
- GridViewHeaderRowPresenter.cs
- XmlSchemaSequence.cs
- InputProcessorProfiles.cs
- ObjectMemberMapping.cs
- HttpProcessUtility.cs
- DocumentPageTextView.cs
- MSAAWinEventWrap.cs
- MasterPageBuildProvider.cs
- Transform3DGroup.cs
- PointCollection.cs
- formatter.cs
- WebRequest.cs
- ToolBar.cs
- ProcessModelInfo.cs
- Form.cs
- WindowsPrincipal.cs
- SafeRegistryHandle.cs
- XmlWrappingReader.cs
- XmlSchemaAppInfo.cs
- DataTableTypeConverter.cs
- UIElementHelper.cs
- DataGridCell.cs
- TimeStampChecker.cs
- _ListenerAsyncResult.cs
- CodeComment.cs
- HandlerBase.cs
- LineMetrics.cs
- RoutedEventArgs.cs
- UriTemplateMatch.cs
- BooleanFacetDescriptionElement.cs
- SoapTypeAttribute.cs
- TextProperties.cs
- XamlTypeMapper.cs
- SecurityDescriptor.cs
- StorageAssociationSetMapping.cs
- BitmapEditor.cs
- CodePageEncoding.cs
- SmtpCommands.cs
- UnionCodeGroup.cs
- CacheRequest.cs
- AssemblyInfo.cs
- Int16AnimationUsingKeyFrames.cs
- Focus.cs
- XmlNamespaceMapping.cs
- SoapAttributeAttribute.cs
- SoapDocumentMethodAttribute.cs
- XmlSchemaFacet.cs
- StringBuilder.cs
- RepeaterCommandEventArgs.cs
- WebPartCatalogCloseVerb.cs
- NetworkInterface.cs
- FormViewUpdatedEventArgs.cs
- StringPropertyBuilder.cs
- DbConnectionHelper.cs
- EntityTypeBase.cs
- ProviderSettingsCollection.cs
- DeflateStream.cs