Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DescendantBaseQuery.cs
- ClientCultureInfo.cs
- TextSelectionProcessor.cs
- CheckBoxPopupAdapter.cs
- ToolBarOverflowPanel.cs
- AssemblyGen.cs
- AttributeData.cs
- WSSecureConversationDec2005.cs
- EncodingTable.cs
- CompositeDuplexElement.cs
- TailCallAnalyzer.cs
- XmlBinaryWriter.cs
- LabelExpression.cs
- XmlCDATASection.cs
- SupportsEventValidationAttribute.cs
- EventEntry.cs
- RelatedCurrencyManager.cs
- EventOpcode.cs
- SurrogateEncoder.cs
- GeometryHitTestResult.cs
- CodeStatementCollection.cs
- WebConfigurationManager.cs
- TimeSpanMinutesConverter.cs
- AutomationIdentifier.cs
- ItemContainerGenerator.cs
- ReachSerializerAsync.cs
- ContentOperations.cs
- MembershipUser.cs
- RunClient.cs
- ComplexLine.cs
- TableRow.cs
- UnsafeNativeMethods.cs
- ImpersonationContext.cs
- ToolStripDropDownMenu.cs
- ObjectDataSourceView.cs
- SqlMetaData.cs
- FacetDescriptionElement.cs
- HandlerWithFactory.cs
- TextMessageEncoder.cs
- TextTreeObjectNode.cs
- ClassDataContract.cs
- TypeElement.cs
- GenericTransactionFlowAttribute.cs
- ProcessHostConfigUtils.cs
- DictionaryBase.cs
- FramingEncoders.cs
- JsonXmlDataContract.cs
- BitmapEffectDrawingContextState.cs
- XmlTypeMapping.cs
- FtpCachePolicyElement.cs
- ClientSideProviderDescription.cs
- ToolStripDropDownItem.cs
- XmlDocument.cs
- FlowDecisionLabelFeature.cs
- Serializer.cs
- ListItemCollection.cs
- SourceInterpreter.cs
- PointKeyFrameCollection.cs
- ErrorProvider.cs
- ActivityBindForm.cs
- Matrix3D.cs
- TCEAdapterGenerator.cs
- MinMaxParagraphWidth.cs
- WebEncodingValidatorAttribute.cs
- OutputCacheProfile.cs
- MessagePropertyDescriptionCollection.cs
- RadioButtonPopupAdapter.cs
- BitmapEffectInputConnector.cs
- ResourceContainer.cs
- HierarchicalDataBoundControl.cs
- Message.cs
- HandlerWithFactory.cs
- String.cs
- SqlUDTStorage.cs
- ReadOnlyTernaryTree.cs
- XmlDocumentSerializer.cs
- RelatedCurrencyManager.cs
- DPCustomTypeDescriptor.cs
- StaticFileHandler.cs
- ImageBrush.cs
- TableRowCollection.cs
- DecimalAverageAggregationOperator.cs
- SchemaElementDecl.cs
- StringStorage.cs
- EntityDataSourceColumn.cs
- DbExpressionRules.cs
- httpapplicationstate.cs
- SafeEventLogReadHandle.cs
- remotingproxy.cs
- ContentType.cs
- PersonalizationProviderCollection.cs
- CalendarDateRange.cs
- InputScope.cs
- EventLogPermissionAttribute.cs
- FontCollection.cs
- DeferredReference.cs
- Guid.cs
- CloseCollectionAsyncResult.cs
- Renderer.cs
- LayoutTable.cs