Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / UInt16Converter.cs / 1 / 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
- Menu.cs
- MonthChangedEventArgs.cs
- HtmlInputRadioButton.cs
- ConfigurationLoader.cs
- BStrWrapper.cs
- XmlTypeMapping.cs
- ArrangedElementCollection.cs
- RunClient.cs
- DataControlReferenceCollection.cs
- Selector.cs
- DataObject.cs
- HashHelper.cs
- CompilerGeneratedAttribute.cs
- PackageRelationship.cs
- StopRoutingHandler.cs
- IOThreadScheduler.cs
- Propagator.Evaluator.cs
- MemoryStream.cs
- MultiSelectRootGridEntry.cs
- UserControl.cs
- Debug.cs
- XmlSignatureProperties.cs
- ParseElementCollection.cs
- Matrix3D.cs
- SafeCertificateContext.cs
- TextCompositionEventArgs.cs
- CapabilitiesState.cs
- StoryFragments.cs
- AsyncCodeActivity.cs
- StorageSetMapping.cs
- OracleConnectionFactory.cs
- XmlBinaryReader.cs
- SerializationTrace.cs
- NativeMethods.cs
- RenamedEventArgs.cs
- DataTableClearEvent.cs
- CrossAppDomainChannel.cs
- FocusChangedEventArgs.cs
- XmlNodeReader.cs
- UserNameSecurityTokenParameters.cs
- _SSPIWrapper.cs
- DelayDesigner.cs
- ViewgenContext.cs
- SerialReceived.cs
- RTTypeWrapper.cs
- CookieProtection.cs
- StrongName.cs
- DrawingGroupDrawingContext.cs
- Typography.cs
- ExpressionBindingCollection.cs
- EqualityComparer.cs
- FormsAuthenticationTicket.cs
- EmptyStringExpandableObjectConverter.cs
- Socket.cs
- XPathScanner.cs
- ExecutionScope.cs
- StaticResourceExtension.cs
- ContentControl.cs
- XPathNodeInfoAtom.cs
- ModelItemExtensions.cs
- DataListItemEventArgs.cs
- nulltextnavigator.cs
- XmlArrayItemAttribute.cs
- HostedBindingBehavior.cs
- OracleTimeSpan.cs
- XmlElementCollection.cs
- ContextMenuService.cs
- HttpDebugHandler.cs
- HwndHostAutomationPeer.cs
- TextServicesDisplayAttributePropertyRanges.cs
- BrowserDefinitionCollection.cs
- SqlFormatter.cs
- SingleStorage.cs
- SoapWriter.cs
- CngAlgorithm.cs
- BoundsDrawingContextWalker.cs
- GroupBoxAutomationPeer.cs
- TypeConverter.cs
- GenericAuthenticationEventArgs.cs
- TableParaClient.cs
- LocationReferenceEnvironment.cs
- BrowserTree.cs
- WebPartCollection.cs
- XmlNamespaceMappingCollection.cs
- SmiTypedGetterSetter.cs
- Attribute.cs
- SiteMapNode.cs
- ControlCodeDomSerializer.cs
- Axis.cs
- SingleAnimation.cs
- NativeMethods.cs
- BitmapEffectDrawingContent.cs
- WebBrowserEvent.cs
- TemplateInstanceAttribute.cs
- propertyentry.cs
- IndexingContentUnit.cs
- CipherData.cs
- ButtonColumn.cs
- DetailsViewRow.cs
- CaseInsensitiveHashCodeProvider.cs