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
- HashAlgorithm.cs
- EventManager.cs
- MemoryPressure.cs
- CurrentChangingEventArgs.cs
- dataprotectionpermissionattribute.cs
- ConfigurationManagerHelperFactory.cs
- QilScopedVisitor.cs
- MultilineStringConverter.cs
- LocalizeDesigner.cs
- FindCriteriaElement.cs
- DrawListViewItemEventArgs.cs
- BrowserTree.cs
- InvalidPropValue.cs
- BulletChrome.cs
- Image.cs
- DataServiceExpressionVisitor.cs
- SqlMethodAttribute.cs
- ManifestSignedXml.cs
- ContractMethodParameterInfo.cs
- APCustomTypeDescriptor.cs
- ISCIIEncoding.cs
- XmlStreamNodeWriter.cs
- HandlerWithFactory.cs
- TypeLoadException.cs
- ServicePoint.cs
- PrinterUnitConvert.cs
- Dynamic.cs
- DataGridViewRowPrePaintEventArgs.cs
- dsa.cs
- IpcManager.cs
- UnitControl.cs
- SortDescription.cs
- EntityContainerRelationshipSet.cs
- ReflectionUtil.cs
- RelatedView.cs
- FileCodeGroup.cs
- SubclassTypeValidatorAttribute.cs
- NoPersistHandle.cs
- CompilerGlobalScopeAttribute.cs
- keycontainerpermission.cs
- ComponentChangingEvent.cs
- TextAdaptor.cs
- ResourceAttributes.cs
- LicenseContext.cs
- Util.cs
- WaitHandle.cs
- PropertyChangeTracker.cs
- ManipulationDelta.cs
- ClipboardProcessor.cs
- ExpandCollapsePattern.cs
- PreservationFileWriter.cs
- WinInetCache.cs
- PropertyDescriptorGridEntry.cs
- CellQuery.cs
- StatusBar.cs
- CompilerHelpers.cs
- BoundingRectTracker.cs
- ListBox.cs
- SelectionItemPattern.cs
- SecurityDescriptor.cs
- ListBox.cs
- MailWebEventProvider.cs
- DeliveryStrategy.cs
- RegexTree.cs
- COM2PictureConverter.cs
- ClientConfigurationSystem.cs
- PackUriHelper.cs
- FixedElement.cs
- BitConverter.cs
- CompressionTransform.cs
- AssemblyName.cs
- SerializationFieldInfo.cs
- BuildProvider.cs
- OpCopier.cs
- EntityViewGenerator.cs
- TiffBitmapEncoder.cs
- CodeFieldReferenceExpression.cs
- SecurityContext.cs
- VisemeEventArgs.cs
- BinaryParser.cs
- VoiceSynthesis.cs
- SocketAddress.cs
- RNGCryptoServiceProvider.cs
- PropertyPathConverter.cs
- TransformerInfo.cs
- DataGridViewHitTestInfo.cs
- SqlDependency.cs
- ControlCachePolicy.cs
- ToolStripItemDataObject.cs
- DomNameTable.cs
- XmlWhitespace.cs
- GuidelineCollection.cs
- EdmEntityTypeAttribute.cs
- SqlFileStream.cs
- ApplicationActivator.cs
- LogicalMethodInfo.cs
- SkewTransform.cs
- X509SecurityTokenProvider.cs
- DesignerDataTableBase.cs
- Line.cs