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
- DataObjectPastingEventArgs.cs
- DataObject.cs
- DataRow.cs
- ImplicitInputBrush.cs
- PeerNameRegistration.cs
- KoreanLunisolarCalendar.cs
- DbgUtil.cs
- MonitorWrapper.cs
- XPathQueryGenerator.cs
- SubMenuStyleCollection.cs
- DataGridViewTextBoxCell.cs
- PanelStyle.cs
- GuidConverter.cs
- Icon.cs
- PriorityRange.cs
- Converter.cs
- FixedBufferAttribute.cs
- OleAutBinder.cs
- SecureEnvironment.cs
- DesignTimeParseData.cs
- DataGridViewAutoSizeModeEventArgs.cs
- SamlSubjectStatement.cs
- LocalizationComments.cs
- PrtTicket_Public.cs
- PrintDialogException.cs
- Lasso.cs
- CodeNamespace.cs
- TrackBarRenderer.cs
- ChangeConflicts.cs
- GridViewAutomationPeer.cs
- Binding.cs
- WebBrowserNavigatedEventHandler.cs
- CacheModeConverter.cs
- MediaScriptCommandRoutedEventArgs.cs
- Vector3DKeyFrameCollection.cs
- Timer.cs
- TextRenderer.cs
- DateTimeValueSerializer.cs
- ConstraintConverter.cs
- Menu.cs
- Parser.cs
- PriorityChain.cs
- TrailingSpaceComparer.cs
- EntityDataSourceWrapper.cs
- ClosureBinding.cs
- XdrBuilder.cs
- RuntimeHandles.cs
- DataBindingCollection.cs
- DNS.cs
- SqlDataAdapter.cs
- AutomationPropertyInfo.cs
- LayeredChannelListener.cs
- SourceInterpreter.cs
- AppSettingsExpressionBuilder.cs
- StrongNamePublicKeyBlob.cs
- GridEntryCollection.cs
- SqlStatistics.cs
- CodeNamespaceImport.cs
- Util.cs
- InternalUserCancelledException.cs
- EnumerableCollectionView.cs
- StreamAsIStream.cs
- GridViewCellAutomationPeer.cs
- SetterBaseCollection.cs
- DataGridViewHeaderCell.cs
- FormViewPageEventArgs.cs
- RelOps.cs
- ContextProperty.cs
- ProcessModule.cs
- StringValueSerializer.cs
- DataSet.cs
- _Connection.cs
- LogicalExpr.cs
- HiddenField.cs
- VolatileResourceManager.cs
- ActivityExecutionContext.cs
- CodeAttributeArgument.cs
- OleStrCAMarshaler.cs
- TransformerInfo.cs
- BitmapCacheBrush.cs
- TextServicesCompartment.cs
- BufferBuilder.cs
- BasicExpandProvider.cs
- ProcessModule.cs
- ObjectListComponentEditor.cs
- WindowsStreamSecurityElement.cs
- WebBrowserPermission.cs
- ChangePassword.cs
- PathGradientBrush.cs
- FocusWithinProperty.cs
- XmlSchemaComplexContentRestriction.cs
- TextFormatter.cs
- HwndSourceParameters.cs
- TextParagraphCache.cs
- Form.cs
- VariableDesigner.xaml.cs
- ProofTokenCryptoHandle.cs
- _IPv4Address.cs
- PropertyToken.cs
- EntityDataSourceDataSelection.cs