Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ConnectionManagementSection.cs
- Number.cs
- SynchronizedInputAdaptor.cs
- EntityClientCacheKey.cs
- WebPartHeaderCloseVerb.cs
- DropDownList.cs
- BindingContext.cs
- FormatException.cs
- Char.cs
- LoggedException.cs
- TCPListener.cs
- XmlDictionaryReader.cs
- PerfCounterSection.cs
- PropertyGeneratedEventArgs.cs
- EventLogPermissionEntry.cs
- OpacityConverter.cs
- ParentQuery.cs
- WindowsPrincipal.cs
- GlobalProxySelection.cs
- SkewTransform.cs
- RegexFCD.cs
- VisualBrush.cs
- RoutedEventHandlerInfo.cs
- DbSourceCommand.cs
- WebPartDeleteVerb.cs
- PolyBezierSegmentFigureLogic.cs
- EmptyReadOnlyDictionaryInternal.cs
- CheckedPointers.cs
- ThreadInterruptedException.cs
- ProfileGroupSettings.cs
- WeakReference.cs
- CryptoApi.cs
- _FtpControlStream.cs
- LZCodec.cs
- TypeToArgumentTypeConverter.cs
- XmlDocument.cs
- WebServiceEnumData.cs
- DataSpaceManager.cs
- SqlTrackingQuery.cs
- RecommendedAsConfigurableAttribute.cs
- FileLogRecordHeader.cs
- QueryCacheKey.cs
- StrokeNode.cs
- SemanticBasicElement.cs
- sqlinternaltransaction.cs
- BooleanConverter.cs
- WebPartCatalogAddVerb.cs
- SqlNotificationRequest.cs
- HttpApplication.cs
- TimeSpanConverter.cs
- GeneralTransformGroup.cs
- NetMsmqBindingElement.cs
- XhtmlBasicCommandAdapter.cs
- OracleParameter.cs
- HtmlListAdapter.cs
- ProxyHwnd.cs
- ExpressionBindings.cs
- ReferencedType.cs
- CharUnicodeInfo.cs
- CompilerWrapper.cs
- BindingManagerDataErrorEventArgs.cs
- ByteAnimationUsingKeyFrames.cs
- GeneratedContractType.cs
- SchemaHelper.cs
- DtrList.cs
- TableItemPatternIdentifiers.cs
- ControlDesigner.cs
- TileBrush.cs
- XPathDocumentIterator.cs
- EntryWrittenEventArgs.cs
- ToolStripProgressBar.cs
- AlternateView.cs
- ServiceInfo.cs
- versioninfo.cs
- MouseButton.cs
- SqlRowUpdatingEvent.cs
- FocusWithinProperty.cs
- DrawingGroup.cs
- RC2CryptoServiceProvider.cs
- DataReceivedEventArgs.cs
- DataGridItemCollection.cs
- ConnectionPoolManager.cs
- NetTcpBindingElement.cs
- DropSource.cs
- FlowDocument.cs
- SimpleWebHandlerParser.cs
- CacheDependency.cs
- UnionCqlBlock.cs
- TextReader.cs
- ImageListUtils.cs
- DataSourceCacheDurationConverter.cs
- DispatchChannelSink.cs
- OraclePermissionAttribute.cs
- Image.cs
- CombinedGeometry.cs
- D3DImage.cs
- Peer.cs
- SettingsPropertyWrongTypeException.cs
- WorkerRequest.cs
- DbUpdateCommandTree.cs