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
- XmlAttribute.cs
- XmlSchemaInclude.cs
- OleDbErrorCollection.cs
- ParallelTimeline.cs
- DiagnosticsConfigurationHandler.cs
- MetafileHeader.cs
- XmlCDATASection.cs
- DllNotFoundException.cs
- EventLogPermission.cs
- CapabilitiesAssignment.cs
- AnnotationResourceCollection.cs
- Soap.cs
- DesignDataSource.cs
- DmlSqlGenerator.cs
- loginstatus.cs
- WizardForm.cs
- XsltSettings.cs
- HandlerFactoryWrapper.cs
- AsyncStreamReader.cs
- StateMachineWorkflow.cs
- BasicViewGenerator.cs
- DisplayNameAttribute.cs
- AffineTransform3D.cs
- TextServicesDisplayAttribute.cs
- ReadWriteControlDesigner.cs
- GridViewPageEventArgs.cs
- ObfuscateAssemblyAttribute.cs
- LogicalTreeHelper.cs
- _HelperAsyncResults.cs
- ColorContextHelper.cs
- PageSettings.cs
- WorkflowStateRollbackService.cs
- DecimalStorage.cs
- CharacterString.cs
- ResourceReferenceKeyNotFoundException.cs
- securestring.cs
- Input.cs
- OutOfMemoryException.cs
- CodeCompileUnit.cs
- TextUtf8RawTextWriter.cs
- BitConverter.cs
- PieceNameHelper.cs
- Nullable.cs
- ActiveXSite.cs
- HttpListenerElement.cs
- ComponentRenameEvent.cs
- MailAddressCollection.cs
- InstancePersistenceException.cs
- TranslateTransform.cs
- ImageAnimator.cs
- TextEffect.cs
- InputDevice.cs
- AnchoredBlock.cs
- FormsAuthenticationCredentials.cs
- SynchronizedRandom.cs
- DocumentPage.cs
- COM2Properties.cs
- DataGridHelper.cs
- BitmapData.cs
- XmlEntityReference.cs
- EntityModelSchemaGenerator.cs
- ImageBrush.cs
- RemotingException.cs
- WhiteSpaceTrimStringConverter.cs
- XmlHierarchyData.cs
- ToolStripDropTargetManager.cs
- BitmapEffectState.cs
- XmlExpressionDumper.cs
- OleDbErrorCollection.cs
- DrawingVisualDrawingContext.cs
- StatusBarItemAutomationPeer.cs
- CurrentChangingEventManager.cs
- XmlBinaryReader.cs
- RegexRunner.cs
- FormViewCommandEventArgs.cs
- GlobalizationSection.cs
- SqlBooleanizer.cs
- DropShadowEffect.cs
- DockPattern.cs
- MimeTypeMapper.cs
- BitmapEffectGeneralTransform.cs
- CodeIdentifiers.cs
- _OverlappedAsyncResult.cs
- TextFormatterImp.cs
- PersonalizationProvider.cs
- Helper.cs
- XmlAttribute.cs
- MenuItemAutomationPeer.cs
- SoapObjectWriter.cs
- GeneratedView.cs
- ArrangedElementCollection.cs
- WebPartMovingEventArgs.cs
- PropertyEntry.cs
- LinkedResourceCollection.cs
- FindCriteria.cs
- CodeTypeParameterCollection.cs
- XmlText.cs
- LinqDataSourceUpdateEventArgs.cs
- CmsUtils.cs
- CryptoProvider.cs