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
- cryptoapiTransform.cs
- WizardForm.cs
- MetadataSerializer.cs
- _OverlappedAsyncResult.cs
- StoreItemCollection.Loader.cs
- XmlCompatibilityReader.cs
- IndicShape.cs
- DbDataSourceEnumerator.cs
- _ShellExpression.cs
- ServiceModelConfigurationSection.cs
- HttpMethodConstraint.cs
- MarkupCompilePass2.cs
- ManagementClass.cs
- IERequestCache.cs
- PointAnimation.cs
- Exceptions.cs
- InternalPolicyElement.cs
- DNS.cs
- CodeActivityContext.cs
- SecurityToken.cs
- UriWriter.cs
- CommonObjectSecurity.cs
- MediaContextNotificationWindow.cs
- MulticastNotSupportedException.cs
- LocationUpdates.cs
- X509IssuerSerialKeyIdentifierClause.cs
- CodeObjectCreateExpression.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- PanelStyle.cs
- ActivityCodeDomReferenceService.cs
- HttpWebResponse.cs
- JavaScriptSerializer.cs
- Operator.cs
- AsyncCompletedEventArgs.cs
- ErrorFormatterPage.cs
- SessionStateModule.cs
- WindowHideOrCloseTracker.cs
- ToolStripGripRenderEventArgs.cs
- DataIdProcessor.cs
- DataSourceUtil.cs
- WebPartConnectionsConnectVerb.cs
- UIPropertyMetadata.cs
- RegexNode.cs
- SendingRequestEventArgs.cs
- MemoryPressure.cs
- WebPartVerbCollection.cs
- DataGridViewControlCollection.cs
- BrowserDefinition.cs
- Vector3DAnimation.cs
- WorkflowStateRollbackService.cs
- CorrelationTokenTypeConvertor.cs
- GetWinFXPath.cs
- SqlWriter.cs
- SrgsElement.cs
- InnerItemCollectionView.cs
- XmlJsonReader.cs
- OdbcTransaction.cs
- PrimitiveRenderer.cs
- ObjectKeyFrameCollection.cs
- Property.cs
- SevenBitStream.cs
- ManagedWndProcTracker.cs
- ConfigurationPropertyAttribute.cs
- RootBrowserWindowProxy.cs
- Root.cs
- ProfilePropertyNameValidator.cs
- LockRenewalTask.cs
- BeginEvent.cs
- FrameworkContentElement.cs
- ClientBuildManager.cs
- Attributes.cs
- ContainerSelectorActiveEvent.cs
- OutKeywords.cs
- WebConvert.cs
- ThreadStateException.cs
- HttpProfileGroupBase.cs
- SemaphoreSecurity.cs
- EncodedStreamFactory.cs
- TextEditorCharacters.cs
- WindowsFormsHost.cs
- OdbcInfoMessageEvent.cs
- XmlTextReader.cs
- WindowsToolbarItemAsMenuItem.cs
- CodeParameterDeclarationExpressionCollection.cs
- RepeatInfo.cs
- ServicePoint.cs
- DesignBindingPicker.cs
- StoragePropertyMapping.cs
- VisualTreeUtils.cs
- ControlCachePolicy.cs
- ActivationProxy.cs
- SwitchLevelAttribute.cs
- sqlstateclientmanager.cs
- SpellerInterop.cs
- XmlSchemaGroup.cs
- SqlMetaData.cs
- GenericUriParser.cs
- CompModSwitches.cs
- ResXBuildProvider.cs
- DataViewManagerListItemTypeDescriptor.cs