Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Command.cs
- DataGridColumnCollectionEditor.cs
- ItemsPresenter.cs
- ReachSerializableProperties.cs
- DiagnosticsElement.cs
- XmlUtil.cs
- FormatConvertedBitmap.cs
- XPathNavigator.cs
- XsltSettings.cs
- IdleTimeoutMonitor.cs
- SourceFileInfo.cs
- ActiveXMessageFormatter.cs
- SecurityHelper.cs
- BooleanToVisibilityConverter.cs
- HtmlControl.cs
- TextEmbeddedObject.cs
- PageCodeDomTreeGenerator.cs
- Console.cs
- Point3D.cs
- TableHeaderCell.cs
- TakeOrSkipQueryOperator.cs
- DefaultValueMapping.cs
- XmlConvert.cs
- MasterPageCodeDomTreeGenerator.cs
- HitTestParameters3D.cs
- SqlUserDefinedTypeAttribute.cs
- HtmlEncodedRawTextWriter.cs
- ByteStack.cs
- DispatchWrapper.cs
- XamlWrappingReader.cs
- X509AsymmetricSecurityKey.cs
- ResXResourceSet.cs
- C14NUtil.cs
- MergeExecutor.cs
- DrawingBrush.cs
- PublisherIdentityPermission.cs
- CapabilitiesUse.cs
- RadioButtonPopupAdapter.cs
- ParallelTimeline.cs
- _ConnectStream.cs
- SynchronizationContext.cs
- XmlNodeList.cs
- RouteItem.cs
- MatchNoneMessageFilter.cs
- ChildTable.cs
- ServiceHttpHandlerFactory.cs
- ChannelSettingsElement.cs
- HtmlInputCheckBox.cs
- ChildTable.cs
- BitmapEffectInput.cs
- FileDialog.cs
- ToolStripPanelSelectionGlyph.cs
- XmlProcessingInstruction.cs
- WCFServiceClientProxyGenerator.cs
- _TLSstream.cs
- ConnectionPoint.cs
- XmlSchemaDatatype.cs
- ProxyWebPartConnectionCollection.cs
- QilScopedVisitor.cs
- PeerPresenceInfo.cs
- XmlSchemaAnnotation.cs
- DataGridViewTextBoxCell.cs
- BigInt.cs
- dsa.cs
- ElapsedEventArgs.cs
- CompositionAdorner.cs
- RadioButton.cs
- CollectionViewProxy.cs
- EncryptedPackage.cs
- ToolboxBitmapAttribute.cs
- MailMessageEventArgs.cs
- SqlCacheDependencySection.cs
- SecurityTokenProviderContainer.cs
- EDesignUtil.cs
- PropertyGridView.cs
- Geometry.cs
- DropShadowBitmapEffect.cs
- OdbcRowUpdatingEvent.cs
- SqlLiftWhereClauses.cs
- XmlUtil.cs
- AlignmentXValidation.cs
- XPathAncestorQuery.cs
- DocumentXmlWriter.cs
- BlurBitmapEffect.cs
- CustomMenuItemCollection.cs
- TextBoxRenderer.cs
- CheckBoxField.cs
- XmlWellformedWriter.cs
- DataGridPagerStyle.cs
- ServiceCredentialsElement.cs
- ConstNode.cs
- ProcessHostServerConfig.cs
- Transform3DGroup.cs
- ScriptModule.cs
- XmlSchemaType.cs
- HtmlShimManager.cs
- Wow64ConfigurationLoader.cs
- ServiceNameCollection.cs
- DataGridTextBoxColumn.cs
- Win32MouseDevice.cs