Code:
/ FX-1434 / FX-1434 / 1.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
- DataContractJsonSerializer.cs
- Paragraph.cs
- FormsAuthenticationCredentials.cs
- GifBitmapEncoder.cs
- BufferedGraphicsManager.cs
- TypeConverterAttribute.cs
- HtmlFormWrapper.cs
- DependencyPropertyDescriptor.cs
- ResizingMessageFilter.cs
- ISAPIRuntime.cs
- WebPartCatalogCloseVerb.cs
- CultureInfoConverter.cs
- ProtocolReflector.cs
- PlaceHolder.cs
- ListControlBuilder.cs
- ListCommandEventArgs.cs
- XmlQueryStaticData.cs
- FormatterConverter.cs
- Wildcard.cs
- PerfCounterSection.cs
- Int32AnimationUsingKeyFrames.cs
- ApplicationManager.cs
- Rights.cs
- WebPartZoneBase.cs
- _UriSyntax.cs
- DbProviderManifest.cs
- HashLookup.cs
- ADMembershipUser.cs
- TraceRecord.cs
- X509SecurityTokenAuthenticator.cs
- UIElementParagraph.cs
- RepeaterItemEventArgs.cs
- Scheduling.cs
- XmlSchemaValidator.cs
- RightsManagementResourceHelper.cs
- DivideByZeroException.cs
- ArrayWithOffset.cs
- HMACSHA512.cs
- DataViewSetting.cs
- InputMethodStateTypeInfo.cs
- RTLAwareMessageBox.cs
- ResourcePool.cs
- BulletedListEventArgs.cs
- SectionInformation.cs
- RootBrowserWindowProxy.cs
- JsonFormatReaderGenerator.cs
- SettingsBindableAttribute.cs
- PtsPage.cs
- PaperSize.cs
- ConfigurationCollectionAttribute.cs
- SpecularMaterial.cs
- DocumentSchemaValidator.cs
- SspiHelper.cs
- PaginationProgressEventArgs.cs
- VectorAnimation.cs
- DependencySource.cs
- XmlExpressionDumper.cs
- RemoteWebConfigurationHostServer.cs
- BinaryFormatterWriter.cs
- HybridDictionary.cs
- MasterPageCodeDomTreeGenerator.cs
- URLIdentityPermission.cs
- ServiceNotStartedException.cs
- FollowerQueueCreator.cs
- ClientBuildManagerCallback.cs
- TextEffectCollection.cs
- ContextQuery.cs
- RC2.cs
- CreateUserErrorEventArgs.cs
- BitmapCacheBrush.cs
- ConfigErrorGlyph.cs
- WebPartHelpVerb.cs
- RenderDataDrawingContext.cs
- EntityCodeGenerator.cs
- TypeConverterHelper.cs
- QuaternionAnimation.cs
- C14NUtil.cs
- AttachmentCollection.cs
- Oci.cs
- documentsequencetextview.cs
- EditingCommands.cs
- SettingsPropertyNotFoundException.cs
- XsdDataContractExporter.cs
- HtmlToClrEventProxy.cs
- RoleGroup.cs
- DataRelationPropertyDescriptor.cs
- ProcessStartInfo.cs
- securitymgrsite.cs
- InstanceCreationEditor.cs
- QilList.cs
- VisualTreeHelper.cs
- ReadOnlyObservableCollection.cs
- BitmapEffectInput.cs
- MembershipSection.cs
- SemanticResolver.cs
- ResourcePart.cs
- SqlUserDefinedAggregateAttribute.cs
- TypeDescriptor.cs
- _ScatterGatherBuffers.cs
- SortedSet.cs