Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / UInt16Converter.cs / 1305376 / UInt16Converter.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 UInt16Converter : BaseNumberConverter { ///Provides a type converter to convert 16-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(UInt16); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToUInt16(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return UInt16.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 UInt16.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((UInt16)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 UInt16Converter : BaseNumberConverter { ///Provides a type converter to convert 16-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(UInt16); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToUInt16(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return UInt16.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 UInt16.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((UInt16)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
- PingOptions.cs
- SafeWaitHandle.cs
- CompiledQueryCacheEntry.cs
- SoapEnumAttribute.cs
- IImplicitResourceProvider.cs
- coordinatorscratchpad.cs
- AddToCollection.cs
- Encoder.cs
- Soap12ProtocolReflector.cs
- PointConverter.cs
- ConsumerConnectionPointCollection.cs
- UrlAuthorizationModule.cs
- EventWaitHandleSecurity.cs
- SmtpNetworkElement.cs
- LockRenewalTask.cs
- _Events.cs
- RootBrowserWindow.cs
- FormViewModeEventArgs.cs
- CookielessData.cs
- Binding.cs
- DataGridViewComboBoxEditingControl.cs
- IgnoreFileBuildProvider.cs
- NativeActivityMetadata.cs
- ProxyFragment.cs
- PenThreadWorker.cs
- DataViewSettingCollection.cs
- NativeMethods.cs
- MD5CryptoServiceProvider.cs
- Preprocessor.cs
- TextStore.cs
- UnsignedPublishLicense.cs
- Crc32.cs
- JavascriptCallbackBehaviorAttribute.cs
- NameService.cs
- UIAgentAsyncEndRequest.cs
- IPGlobalProperties.cs
- UInt32Converter.cs
- FlowLayoutPanel.cs
- CommandArguments.cs
- CacheAxisQuery.cs
- PersistenceTypeAttribute.cs
- SpellerStatusTable.cs
- OpenTypeLayoutCache.cs
- SignatureHelper.cs
- BatchStream.cs
- UserControlParser.cs
- CompiledRegexRunnerFactory.cs
- WindowsFormsEditorServiceHelper.cs
- IProducerConsumerCollection.cs
- GridViewRowCollection.cs
- EventLogEntry.cs
- WindowsAuthenticationModule.cs
- ServiceOperation.cs
- xsdvalidator.cs
- LayoutExceptionEventArgs.cs
- XPathDocument.cs
- AssemblyNameProxy.cs
- Inflater.cs
- WizardDesigner.cs
- RawUIStateInputReport.cs
- ClientSideProviderDescription.cs
- SqlNodeAnnotation.cs
- BigIntegerStorage.cs
- HWStack.cs
- ConsoleKeyInfo.cs
- CodeAccessPermission.cs
- ZoneMembershipCondition.cs
- SqlProviderManifest.cs
- SmiEventStream.cs
- DesignerActionKeyboardBehavior.cs
- DataGridViewColumnStateChangedEventArgs.cs
- NotFiniteNumberException.cs
- SelectionUIService.cs
- SessionEndingCancelEventArgs.cs
- StoryFragments.cs
- ObjectComplexPropertyMapping.cs
- WebRequestModuleElement.cs
- COM2Enum.cs
- XPathException.cs
- ExpressionQuoter.cs
- ContentElementCollection.cs
- EnumUnknown.cs
- Error.cs
- XmlQueryCardinality.cs
- ClassHandlersStore.cs
- SchemaManager.cs
- TCEAdapterGenerator.cs
- InkSerializer.cs
- SigningCredentials.cs
- DataProtectionSecurityStateEncoder.cs
- SafeUserTokenHandle.cs
- ViewValidator.cs
- CurrencyWrapper.cs
- RoutedEventConverter.cs
- QueryAccessibilityHelpEvent.cs
- CacheAxisQuery.cs
- WebPartCatalogCloseVerb.cs
- Assembly.cs
- SamlAdvice.cs
- Block.cs