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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializableAttribute.cs
- PhysicalOps.cs
- StringDictionary.cs
- BaseCAMarshaler.cs
- SqlRowUpdatedEvent.cs
- PrinterSettings.cs
- WizardForm.cs
- DocumentReferenceCollection.cs
- TextAnchor.cs
- CatalogZoneDesigner.cs
- Comparer.cs
- SponsorHelper.cs
- KnownTypes.cs
- SynchronizedDispatch.cs
- LinkedResourceCollection.cs
- TimeSpanOrInfiniteConverter.cs
- TableLayoutStyleCollection.cs
- ExecutionEngineException.cs
- CodeChecksumPragma.cs
- PackUriHelper.cs
- DiagnosticsConfigurationHandler.cs
- Compilation.cs
- AttributeCollection.cs
- PackWebResponse.cs
- XmlBindingWorker.cs
- SqlBulkCopy.cs
- IISUnsafeMethods.cs
- SqlAliaser.cs
- TraceFilter.cs
- IDQuery.cs
- ReachDocumentSequenceSerializerAsync.cs
- DefaultEvaluationContext.cs
- ListViewContainer.cs
- SafeFileHandle.cs
- TreeNodeEventArgs.cs
- RequestCacheManager.cs
- BuildManagerHost.cs
- MetricEntry.cs
- RecordBuilder.cs
- RayMeshGeometry3DHitTestResult.cs
- coordinatorscratchpad.cs
- ListChangedEventArgs.cs
- WindowShowOrOpenTracker.cs
- CookieParameter.cs
- ObjectSecurity.cs
- TextDpi.cs
- BaseProcessor.cs
- LiteralTextContainerControlBuilder.cs
- SafeLocalMemHandle.cs
- PropertyPath.cs
- Ops.cs
- QilPatternVisitor.cs
- OdbcConnectionString.cs
- BitmapData.cs
- UniqueEventHelper.cs
- SeverityFilter.cs
- FieldNameLookup.cs
- ExpressionReplacer.cs
- FrameAutomationPeer.cs
- Translator.cs
- ClientType.cs
- ThreadInterruptedException.cs
- XmlFormatExtensionPointAttribute.cs
- MultipleViewProviderWrapper.cs
- ArrayListCollectionBase.cs
- AutomationIdentifier.cs
- SiteOfOriginPart.cs
- connectionpool.cs
- ProfileService.cs
- GenericTypeParameterBuilder.cs
- NativeObjectSecurity.cs
- MSAANativeProvider.cs
- MetafileHeaderEmf.cs
- ImmutableObjectAttribute.cs
- Pens.cs
- Int64AnimationUsingKeyFrames.cs
- PrintingPermissionAttribute.cs
- OleDbTransaction.cs
- EditingMode.cs
- ConnectionProviderAttribute.cs
- ProcessHost.cs
- ElementProxy.cs
- HtmlInputSubmit.cs
- AliasedSlot.cs
- CodeDomExtensionMethods.cs
- ScriptingAuthenticationServiceSection.cs
- DataSourceConverter.cs
- SwitchElementsCollection.cs
- RuntimeHandles.cs
- ModulesEntry.cs
- SqlDataSourceFilteringEventArgs.cs
- ConfigurationCollectionAttribute.cs
- SafeCryptHandles.cs
- XPathAxisIterator.cs
- DataGridViewButtonCell.cs
- Transactions.cs
- OleDbConnectionInternal.cs
- RegistrationServices.cs
- WebSysDescriptionAttribute.cs
- CompositeFontParser.cs