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
- CodeBinaryOperatorExpression.cs
- MessageQueueConverter.cs
- SafeViewOfFileHandle.cs
- GeometryDrawing.cs
- WebBaseEventKeyComparer.cs
- StateItem.cs
- WebEvents.cs
- UniqueIdentifierService.cs
- XmlAttributeCollection.cs
- CorrelationManager.cs
- CAGDesigner.cs
- RoutedEventArgs.cs
- Constants.cs
- BufferCache.cs
- DataServiceConfiguration.cs
- TrackingProfileCache.cs
- Parameter.cs
- Rotation3D.cs
- FontEditor.cs
- IPEndPointCollection.cs
- WebServiceTypeData.cs
- CloudCollection.cs
- DataGridColumnCollection.cs
- ClassicBorderDecorator.cs
- ImmutableObjectAttribute.cs
- SimpleType.cs
- SimpleApplicationHost.cs
- GPRECTF.cs
- SerializableAttribute.cs
- HyperLinkStyle.cs
- OutOfMemoryException.cs
- ScrollViewerAutomationPeer.cs
- NumericPagerField.cs
- XmlDocumentViewSchema.cs
- TypeConverterMarkupExtension.cs
- DataTransferEventArgs.cs
- CopyEncoder.cs
- DataSourceCache.cs
- CustomAttribute.cs
- DnsPermission.cs
- LiteralControl.cs
- ToolBarDesigner.cs
- OdbcDataReader.cs
- WriteTimeStream.cs
- DbSourceParameterCollection.cs
- Int32KeyFrameCollection.cs
- SerializationTrace.cs
- cookiecontainer.cs
- SqlServices.cs
- StackSpiller.Bindings.cs
- SafeEventLogReadHandle.cs
- ProfileEventArgs.cs
- MimeBasePart.cs
- IUnknownConstantAttribute.cs
- EntityDataSourceUtil.cs
- PanelStyle.cs
- SimpleWebHandlerParser.cs
- EntityParameter.cs
- oledbmetadatacolumnnames.cs
- DataSetSchema.cs
- LocalBuilder.cs
- ComboBoxAutomationPeer.cs
- RuntimeWrappedException.cs
- ImageMapEventArgs.cs
- FunctionQuery.cs
- BrowserInteropHelper.cs
- DeviceFilterEditorDialog.cs
- FilterRepeater.cs
- DataGridViewImageCell.cs
- URI.cs
- _UriTypeConverter.cs
- DPTypeDescriptorContext.cs
- Validator.cs
- TreeNodeStyleCollection.cs
- AnnotationService.cs
- DataGridParentRows.cs
- bidPrivateBase.cs
- HtmlTernaryTree.cs
- PeerNameRegistration.cs
- DbgUtil.cs
- ParentQuery.cs
- InfocardChannelParameter.cs
- CheckBoxAutomationPeer.cs
- PageThemeCodeDomTreeGenerator.cs
- AppDomainUnloadedException.cs
- ListViewContainer.cs
- ConfigurationErrorsException.cs
- propertytag.cs
- GlobalizationSection.cs
- LineBreak.cs
- WeakReferenceEnumerator.cs
- CompositeCollection.cs
- TextEditorMouse.cs
- QilXmlReader.cs
- StateWorkerRequest.cs
- CharacterMetricsDictionary.cs
- Type.cs
- CodeMemberField.cs
- GradientPanel.cs
- XmlILStorageConverter.cs