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
- FormView.cs
- QueryRewriter.cs
- SafeNativeMethods.cs
- Serializer.cs
- XmlNodeChangedEventManager.cs
- SQLInt16Storage.cs
- ConstNode.cs
- DelegateSerializationHolder.cs
- StrokeIntersection.cs
- MethodSet.cs
- EventLogPropertySelector.cs
- FileLevelControlBuilderAttribute.cs
- Root.cs
- StringUtil.cs
- MetadataItem_Static.cs
- FilterEventArgs.cs
- WsatStrings.cs
- PenCursorManager.cs
- MultipartContentParser.cs
- DataGridView.cs
- _TLSstream.cs
- codemethodreferenceexpression.cs
- ListQueryResults.cs
- TextEndOfSegment.cs
- ProjectionPath.cs
- MenuItemStyleCollection.cs
- EarlyBoundInfo.cs
- StylusPointPropertyInfoDefaults.cs
- FilteredAttributeCollection.cs
- FilterElement.cs
- OperandQuery.cs
- IResourceProvider.cs
- GC.cs
- RuntimeCompatibilityAttribute.cs
- TimelineGroup.cs
- CurrentTimeZone.cs
- WhitespaceSignificantCollectionAttribute.cs
- WCFServiceClientProxyGenerator.cs
- RMEnrollmentPage2.cs
- SecureConversationServiceElement.cs
- TiffBitmapEncoder.cs
- BitmapSizeOptions.cs
- SafeEventLogWriteHandle.cs
- URLString.cs
- Speller.cs
- SchemaEntity.cs
- ManualResetEvent.cs
- PageRanges.cs
- ImportCatalogPart.cs
- FigureParagraph.cs
- TemplateBindingExpressionConverter.cs
- WebCategoryAttribute.cs
- AsyncStreamReader.cs
- InputReportEventArgs.cs
- Regex.cs
- ExceptionTrace.cs
- RtfFormatStack.cs
- SecurityState.cs
- Header.cs
- SettingsPropertyWrongTypeException.cs
- Random.cs
- RenderingBiasValidation.cs
- SmtpAuthenticationManager.cs
- SerializationInfo.cs
- MailDefinition.cs
- EntityContainer.cs
- SAPIEngineTypes.cs
- FloaterBaseParagraph.cs
- DependencyPropertyChangedEventArgs.cs
- ParseHttpDate.cs
- SQLUtility.cs
- WhitespaceSignificantCollectionAttribute.cs
- KernelTypeValidation.cs
- SettingsPropertyValue.cs
- DocumentViewerAutomationPeer.cs
- BinaryMessageFormatter.cs
- WebReferencesBuildProvider.cs
- WindowsStatic.cs
- Scheduler.cs
- DecoderFallback.cs
- CodeAttributeDeclaration.cs
- CodeNamespaceCollection.cs
- CollectionCodeDomSerializer.cs
- BlurBitmapEffect.cs
- CompositeKey.cs
- ICspAsymmetricAlgorithm.cs
- DataView.cs
- PlainXmlDeserializer.cs
- MenuStrip.cs
- XPathDocumentNavigator.cs
- ProfileSettingsCollection.cs
- RoleManagerEventArgs.cs
- ValidationPropertyAttribute.cs
- MailFileEditor.cs
- MethodExpr.cs
- ObjectDataSourceStatusEventArgs.cs
- TextBoxView.cs
- Vector3DCollectionConverter.cs
- ShapingWorkspace.cs
- MultipartIdentifier.cs