Code:
/ FX-1434 / FX-1434 / 1.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
- PseudoWebRequest.cs
- WebPartHeaderCloseVerb.cs
- HtmlElementCollection.cs
- DelegateSerializationHolder.cs
- ParameterCollection.cs
- SplitterPanel.cs
- validationstate.cs
- PointConverter.cs
- BaseParser.cs
- DataGridViewRowConverter.cs
- CodeRegionDirective.cs
- _IPv6Address.cs
- ParserExtension.cs
- ListBox.cs
- ProxyAssemblyNotLoadedException.cs
- WebPartConnectionsEventArgs.cs
- Base64Encoder.cs
- DataGridViewCheckBoxCell.cs
- OletxVolatileEnlistment.cs
- TextElementCollection.cs
- OracleNumber.cs
- Reference.cs
- HtmlContainerControl.cs
- AttachedPropertiesService.cs
- SqlDataSource.cs
- ListViewAutomationPeer.cs
- ItemAutomationPeer.cs
- FloatAverageAggregationOperator.cs
- TextRangeEditTables.cs
- SourceItem.cs
- CommonRemoteMemoryBlock.cs
- SafeCertificateStore.cs
- HtmlInputButton.cs
- SiteMapNodeItem.cs
- AuthenticatingEventArgs.cs
- UnsafeNativeMethods.cs
- FrameworkContentElement.cs
- DoubleConverter.cs
- ProtocolImporter.cs
- RestClientProxyHandler.cs
- ParameterDataSourceExpression.cs
- ComponentEditorForm.cs
- SqlTriggerContext.cs
- AutomationEventArgs.cs
- DeleteMemberBinder.cs
- HyperlinkAutomationPeer.cs
- ClientSideProviderDescription.cs
- UTF32Encoding.cs
- MaskInputRejectedEventArgs.cs
- SqlDataSourceView.cs
- UserMapPath.cs
- ProtocolsConfiguration.cs
- MapPathBasedVirtualPathProvider.cs
- InkCanvasFeedbackAdorner.cs
- DependencyPropertyChangedEventArgs.cs
- ComponentDispatcher.cs
- ManagedCodeMarkers.cs
- NamespaceImport.cs
- Psha1DerivedKeyGenerator.cs
- InvalidWMPVersionException.cs
- SignedPkcs7.cs
- FontSource.cs
- PathSegment.cs
- MaskedTextBoxTextEditorDropDown.cs
- DesignSurfaceServiceContainer.cs
- InvokeFunc.cs
- WindowsSecurityTokenAuthenticator.cs
- FontStretch.cs
- LicenseException.cs
- StylusPointProperties.cs
- LinearQuaternionKeyFrame.cs
- PartialCachingControl.cs
- IPAddressCollection.cs
- DesignSurfaceServiceContainer.cs
- OLEDB_Util.cs
- SessionStateContainer.cs
- SessionIDManager.cs
- DispatcherHookEventArgs.cs
- SqlMethodAttribute.cs
- MemberRelationshipService.cs
- ConfigurationCollectionAttribute.cs
- SqlCaseSimplifier.cs
- SmiEventSink.cs
- ToolboxItem.cs
- RepeatInfo.cs
- METAHEADER.cs
- HintTextMaxWidthConverter.cs
- FormatSelectingMessageInspector.cs
- EpmContentSerializer.cs
- _UriSyntax.cs
- EdmSchemaError.cs
- SafeRightsManagementSessionHandle.cs
- InkCanvasInnerCanvas.cs
- TransactionTraceIdentifier.cs
- XmlDataSourceView.cs
- StubHelpers.cs
- BindToObject.cs
- SystemIPv4InterfaceProperties.cs
- CompiledQueryCacheKey.cs
- WorkflowWebHostingModule.cs