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
- WebServiceFault.cs
- RegionIterator.cs
- PageClientProxyGenerator.cs
- HtmlFormAdapter.cs
- HandlerBase.cs
- TransportContext.cs
- Util.cs
- SystemInfo.cs
- FacetDescriptionElement.cs
- PageParserFilter.cs
- RuntimeTransactionHandle.cs
- shaperfactoryquerycacheentry.cs
- TemplateApplicationHelper.cs
- AddInPipelineAttributes.cs
- SortDescription.cs
- ExpandCollapseProviderWrapper.cs
- PeerNode.cs
- GridViewColumnCollection.cs
- DataControlLinkButton.cs
- DataGridItemEventArgs.cs
- CombinedHttpChannel.cs
- DataComponentMethodGenerator.cs
- FileInfo.cs
- ListControlDataBindingHandler.cs
- OpenFileDialog.cs
- ApplySecurityAndSendAsyncResult.cs
- Encoding.cs
- BufferedGraphicsContext.cs
- ComplexObject.cs
- DoubleCollection.cs
- SiteMapNode.cs
- input.cs
- DataTableTypeConverter.cs
- NameScopePropertyAttribute.cs
- InputGestureCollection.cs
- WebBaseEventKeyComparer.cs
- Crc32.cs
- StringFunctions.cs
- SafeRegistryKey.cs
- StreamingContext.cs
- ThemeableAttribute.cs
- OracleConnectionFactory.cs
- UnsafeNativeMethods.cs
- DeviceFilterEditorDialog.cs
- DefaultProxySection.cs
- TypeValidationEventArgs.cs
- ObservableDictionary.cs
- DictionaryTraceRecord.cs
- ResourceCollectionInfo.cs
- EntityDataReader.cs
- Condition.cs
- TreeNodeClickEventArgs.cs
- WsatAdminException.cs
- ReverseQueryOperator.cs
- ApplicationHost.cs
- DataBinder.cs
- ReflectionPermission.cs
- ChtmlCalendarAdapter.cs
- XsdDuration.cs
- GZipUtils.cs
- ListControlConvertEventArgs.cs
- DbMetaDataFactory.cs
- FixedTextView.cs
- OperatingSystem.cs
- UriTemplateLiteralPathSegment.cs
- CompilerTypeWithParams.cs
- CustomCategoryAttribute.cs
- TcpTransportSecurity.cs
- Control.cs
- DataGridItemCollection.cs
- dataprotectionpermissionattribute.cs
- ContextMenuStripGroup.cs
- EntityDataSourceWizardForm.cs
- MemberProjectionIndex.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- HtmlLabelAdapter.cs
- QilStrConcat.cs
- SynchronizingStream.cs
- XamlDesignerSerializationManager.cs
- Token.cs
- GridViewCellAutomationPeer.cs
- VectorKeyFrameCollection.cs
- QualificationDataItem.cs
- errorpatternmatcher.cs
- ExpressionConverter.cs
- RoleService.cs
- DetailsViewModeEventArgs.cs
- SamlAttribute.cs
- DSACryptoServiceProvider.cs
- GridViewRowEventArgs.cs
- QuaternionAnimationBase.cs
- DesignerForm.cs
- DrawingContext.cs
- Transform3D.cs
- DynamicValidatorEventArgs.cs
- AvTraceFormat.cs
- InputMethodStateChangeEventArgs.cs
- SQLDouble.cs
- UrlPath.cs
- BinaryUtilClasses.cs