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
- GB18030Encoding.cs
- State.cs
- DocumentViewerHelper.cs
- EmptyStringExpandableObjectConverter.cs
- propertyentry.cs
- SizeAnimationUsingKeyFrames.cs
- BamlResourceSerializer.cs
- SaveRecipientRequest.cs
- CodeCatchClauseCollection.cs
- ZoneButton.cs
- ScopelessEnumAttribute.cs
- Events.cs
- ProjectionCamera.cs
- GeometryConverter.cs
- SessionParameter.cs
- GridViewItemAutomationPeer.cs
- ReachPageContentCollectionSerializerAsync.cs
- GAC.cs
- ExceptionDetail.cs
- SingleObjectCollection.cs
- ListViewDeletedEventArgs.cs
- EdmProviderManifest.cs
- Thumb.cs
- RequestDescription.cs
- Model3DCollection.cs
- BaseDataBoundControl.cs
- NGCUIElementCollectionSerializerAsync.cs
- Matrix3D.cs
- ImageListUtils.cs
- COM2PictureConverter.cs
- EnumerableRowCollectionExtensions.cs
- EventsTab.cs
- BitmapEffectDrawing.cs
- LineGeometry.cs
- HttpApplicationFactory.cs
- SelectedCellsChangedEventArgs.cs
- CssStyleCollection.cs
- CachedFontFace.cs
- FtpWebRequest.cs
- basevalidator.cs
- Crypto.cs
- TreePrinter.cs
- SafeFileMapViewHandle.cs
- EdmTypeAttribute.cs
- DesignConnection.cs
- TextSchema.cs
- CommonObjectSecurity.cs
- documentsequencetextpointer.cs
- Int32KeyFrameCollection.cs
- CheckBoxRenderer.cs
- DataPagerFieldItem.cs
- validationstate.cs
- SqlBinder.cs
- ConcurrentStack.cs
- DataGridViewImageColumn.cs
- SqlProvider.cs
- PcmConverter.cs
- CreateParams.cs
- BindingWorker.cs
- DataBoundControlActionList.cs
- DataColumnChangeEvent.cs
- CommentEmitter.cs
- SqlDependency.cs
- ReadOnlyAttribute.cs
- HwndAppCommandInputProvider.cs
- XmlArrayItemAttributes.cs
- DeviceSpecificDialogCachedState.cs
- ConfigurationElementProperty.cs
- SliderAutomationPeer.cs
- WebPartUtil.cs
- DebugView.cs
- InvalidComObjectException.cs
- TextProperties.cs
- _ChunkParse.cs
- XmlSubtreeReader.cs
- ForeignKeyConstraint.cs
- ADConnectionHelper.cs
- CircleHotSpot.cs
- ExtensionQuery.cs
- EventSinkActivityDesigner.cs
- ResumeStoryboard.cs
- DataGridViewTextBoxCell.cs
- PageSetupDialog.cs
- SoapRpcMethodAttribute.cs
- DataGridViewCellStyleChangedEventArgs.cs
- _NtlmClient.cs
- DateTimeFormatInfo.cs
- DecoderBestFitFallback.cs
- RawStylusInputCustomDataList.cs
- ChangesetResponse.cs
- SqlDataSourceCommandEventArgs.cs
- PointValueSerializer.cs
- SequentialOutput.cs
- XmlSchemaSearchPattern.cs
- ScriptControlManager.cs
- _ListenerAsyncResult.cs
- TextBox.cs
- TreeView.cs
- ParseHttpDate.cs
- Debug.cs