Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / Int16Converter.cs / 1 / Int16Converter.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 Int16Converter : BaseNumberConverter { ///Provides a type converter to convert 16-bit signed 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(Int16); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToInt16(value, radix); } ////// Convert the given value to a string using the given CultureInfo /// internal override object FromString(string value, CultureInfo culture){ return Int16.Parse(value, culture); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Int16.Parse(value, NumberStyles.Integer, formatInfo); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Int16)value).ToString("G", formatInfo); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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 Int16Converter : BaseNumberConverter { ///Provides a type converter to convert 16-bit signed 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(Int16); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToInt16(value, radix); } ////// Convert the given value to a string using the given CultureInfo /// internal override object FromString(string value, CultureInfo culture){ return Int16.Parse(value, culture); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Int16.Parse(value, NumberStyles.Integer, formatInfo); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Int16)value).ToString("G", formatInfo); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TemplateBamlTreeBuilder.cs
- SocketElement.cs
- SqlDataSource.cs
- Base64Encoder.cs
- Site.cs
- DataSourceExpressionCollection.cs
- WebCategoryAttribute.cs
- newinstructionaction.cs
- StreamWriter.cs
- TransformerTypeCollection.cs
- UriTemplateLiteralPathSegment.cs
- Visual3D.cs
- PathSegment.cs
- ConfigurationErrorsException.cs
- ClientSession.cs
- Automation.cs
- PageTheme.cs
- PolyLineSegmentFigureLogic.cs
- WebPartConnection.cs
- BitmapEncoder.cs
- TriggerBase.cs
- Selector.cs
- recordstatescratchpad.cs
- InheritedPropertyChangedEventArgs.cs
- XmlArrayAttribute.cs
- OdbcException.cs
- PermissionAttributes.cs
- InfocardExtendedInformationCollection.cs
- CustomCategoryAttribute.cs
- CreateUserWizardStep.cs
- BitmapFrame.cs
- ElementNotEnabledException.cs
- DescendentsWalker.cs
- DecimalAverageAggregationOperator.cs
- PointCollection.cs
- TextEditorDragDrop.cs
- LinkGrep.cs
- CodeMemberMethod.cs
- CallbackDebugElement.cs
- XmlDeclaration.cs
- xml.cs
- MatrixAnimationBase.cs
- ConfigurationStrings.cs
- CodeCatchClauseCollection.cs
- querybuilder.cs
- Executor.cs
- DbParameterCollectionHelper.cs
- DbConnectionPoolGroupProviderInfo.cs
- SafeRightsManagementEnvironmentHandle.cs
- DesignerForm.cs
- Storyboard.cs
- ParagraphResult.cs
- XmlObjectSerializerReadContextComplex.cs
- SessionStateUtil.cs
- XmlNodeList.cs
- JournalNavigationScope.cs
- FixedTextSelectionProcessor.cs
- CellCreator.cs
- Wizard.cs
- TypeUtil.cs
- IndicFontClient.cs
- DataGridLinkButton.cs
- SiteMapNodeItem.cs
- NavigationFailedEventArgs.cs
- XmlHierarchicalEnumerable.cs
- CodeTypeOfExpression.cs
- CultureTableRecord.cs
- HttpHandlerActionCollection.cs
- BaseDataBoundControlDesigner.cs
- Memoizer.cs
- Schema.cs
- Trigger.cs
- ScriptingAuthenticationServiceSection.cs
- HttpRawResponse.cs
- GeneralTransform3DGroup.cs
- ThreadSafeMessageFilterTable.cs
- PageParserFilter.cs
- HttpConfigurationSystem.cs
- Window.cs
- DataServiceQueryContinuation.cs
- WinInet.cs
- mongolianshape.cs
- DateTimeParse.cs
- XmlAttribute.cs
- AssemblyUtil.cs
- FormViewInsertEventArgs.cs
- KeyValueInternalCollection.cs
- ParserExtension.cs
- HttpModule.cs
- SecurityContext.cs
- ReadOnlyObservableCollection.cs
- DocumentPageHost.cs
- IMembershipProvider.cs
- SecurityTokenProvider.cs
- TypeUtils.cs
- ImagingCache.cs
- ParsedAttributeCollection.cs
- SafeIUnknown.cs
- CacheSection.cs
- GacUtil.cs