Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PointKeyFrameCollection.cs
- XmlTypeAttribute.cs
- MailAddressCollection.cs
- TrackingRecord.cs
- TransformDescriptor.cs
- ZoomPercentageConverter.cs
- ReceiveActivityDesignerTheme.cs
- TransformerInfo.cs
- DataSourceIDConverter.cs
- MatrixTransform3D.cs
- DbConnectionPoolGroupProviderInfo.cs
- SqlLiftWhereClauses.cs
- ToolStripItemEventArgs.cs
- SafeNativeMethods.cs
- Selection.cs
- CodeLinePragma.cs
- Converter.cs
- UrlMappingsModule.cs
- PipelineModuleStepContainer.cs
- PairComparer.cs
- SrgsElementList.cs
- RelationshipFixer.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- CommentEmitter.cs
- CodeTypeOfExpression.cs
- TextHidden.cs
- DBSqlParserTableCollection.cs
- CustomAttributeBuilder.cs
- DataObject.cs
- XmlILIndex.cs
- Regex.cs
- MetabaseSettings.cs
- AmbiguousMatchException.cs
- DefaultMemberAttribute.cs
- UserUseLicenseDictionaryLoader.cs
- ISAPIRuntime.cs
- DesignerActionItem.cs
- XmlNotation.cs
- CompositeControl.cs
- BuilderPropertyEntry.cs
- OrthographicCamera.cs
- VScrollProperties.cs
- TemplateField.cs
- WebEventCodes.cs
- SqlTriggerAttribute.cs
- TypePropertyEditor.cs
- Graphics.cs
- GuidelineSet.cs
- TypeDelegator.cs
- StylusPlugin.cs
- HtmlEmptyTagControlBuilder.cs
- DesignerDataTable.cs
- DynamicRenderer.cs
- WebBrowserUriTypeConverter.cs
- GridItemPattern.cs
- DependencyObject.cs
- Transform3DGroup.cs
- Model3D.cs
- IteratorDescriptor.cs
- ConfigurationException.cs
- TextBoxBaseDesigner.cs
- InstanceData.cs
- ConfigXmlComment.cs
- MenuStrip.cs
- DataServiceRequestException.cs
- InteropBitmapSource.cs
- CompiledQuery.cs
- FixedSOMSemanticBox.cs
- DateTimeOffsetStorage.cs
- EditingCoordinator.cs
- ImageUrlEditor.cs
- CheckBox.cs
- AsmxEndpointPickerExtension.cs
- WebPartTransformer.cs
- WebPartDesigner.cs
- Type.cs
- RawAppCommandInputReport.cs
- QueryOpeningEnumerator.cs
- MD5CryptoServiceProvider.cs
- Variant.cs
- DigestComparer.cs
- FragmentNavigationEventArgs.cs
- Rotation3D.cs
- SequenceFullException.cs
- SqlWebEventProvider.cs
- PeerObject.cs
- EncryptedData.cs
- relpropertyhelper.cs
- SystemFonts.cs
- DefaultValueTypeConverter.cs
- ProviderMetadataCachedInformation.cs
- SafeNativeMethodsCLR.cs
- PagedDataSource.cs
- XmlSchemaExporter.cs
- WindowsButton.cs
- PropertyItem.cs
- DeclaredTypeValidator.cs
- PasswordTextNavigator.cs
- SoapAttributes.cs
- TranslateTransform.cs