Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Assert.cs
- PageTheme.cs
- Stroke.cs
- ViewLoader.cs
- ObjectComplexPropertyMapping.cs
- EncryptedReference.cs
- ServiceContractDetailViewControl.cs
- UnknownExceptionActionHelper.cs
- NameObjectCollectionBase.cs
- VectorCollectionConverter.cs
- WebPartConnectVerb.cs
- XmlAttributes.cs
- BatchStream.cs
- ZipIOExtraFieldZip64Element.cs
- TemplateControlParser.cs
- _ListenerResponseStream.cs
- UpdateProgress.cs
- Bits.cs
- InlineCollection.cs
- Encoder.cs
- ComponentConverter.cs
- ImageCollectionEditor.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- RectAnimationBase.cs
- DataGridColumnCollection.cs
- MarshalByValueComponent.cs
- VersionedStreamOwner.cs
- InputMethodStateChangeEventArgs.cs
- SizeAnimationClockResource.cs
- SrgsDocumentParser.cs
- MimePart.cs
- BaseValidator.cs
- ReplyAdapterChannelListener.cs
- CompensationTokenData.cs
- RepeatBehaviorConverter.cs
- Normalizer.cs
- CompositeControl.cs
- DispatcherProcessingDisabled.cs
- XmlSchemaAnnotated.cs
- WebBodyFormatMessageProperty.cs
- WebScriptClientGenerator.cs
- TableRow.cs
- OdbcConnectionHandle.cs
- XamlTypeWithExplicitNamespace.cs
- PrtTicket_Public_Simple.cs
- AddressHeaderCollection.cs
- DiscreteKeyFrames.cs
- RegistryConfigurationProvider.cs
- DBCSCodePageEncoding.cs
- CustomBindingCollectionElement.cs
- DataControlFieldTypeEditor.cs
- PageWrapper.cs
- DBSqlParserColumn.cs
- FormViewDeleteEventArgs.cs
- JournalEntryListConverter.cs
- PlacementWorkspace.cs
- OdbcError.cs
- ACL.cs
- IndependentlyAnimatedPropertyMetadata.cs
- QueueProcessor.cs
- TypeGenericEnumerableViewSchema.cs
- AttachedPropertiesService.cs
- MessageQueue.cs
- SqlCharStream.cs
- RegionData.cs
- ExceptionHelpers.cs
- ConfigXmlText.cs
- CursorConverter.cs
- MonthChangedEventArgs.cs
- ContourSegment.cs
- System.Data.OracleClient_BID.cs
- DocumentAutomationPeer.cs
- TitleStyle.cs
- FixedPage.cs
- HostExecutionContextManager.cs
- LicFileLicenseProvider.cs
- StackSpiller.cs
- WebPartCatalogCloseVerb.cs
- Misc.cs
- BmpBitmapDecoder.cs
- StringAnimationUsingKeyFrames.cs
- TrustManagerMoreInformation.cs
- assertwrapper.cs
- DummyDataSource.cs
- SocketInformation.cs
- WebPartDisplayModeCancelEventArgs.cs
- ConnectionsZoneAutoFormat.cs
- TextRangeSerialization.cs
- IIS7WorkerRequest.cs
- CodeLabeledStatement.cs
- RoleService.cs
- SettingsSavedEventArgs.cs
- CheckBox.cs
- AssociationSetMetadata.cs
- ToolboxItemWrapper.cs
- RegexTree.cs
- ListViewItemEventArgs.cs
- ImportContext.cs
- ExtractorMetadata.cs
- RootBuilder.cs