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
- QilInvokeEarlyBound.cs
- NotifyInputEventArgs.cs
- WmlTextViewAdapter.cs
- SecurityTokenParameters.cs
- Flattener.cs
- RegexFCD.cs
- EnlistmentState.cs
- ResourceDescriptionAttribute.cs
- UnsafeNativeMethods.cs
- AsymmetricKeyExchangeDeformatter.cs
- MainMenu.cs
- DBDataPermission.cs
- InvalidFilterCriteriaException.cs
- XNodeNavigator.cs
- FontNameEditor.cs
- Win32Native.cs
- CodeGenerator.cs
- MetabaseReader.cs
- SecurityIdentifierElement.cs
- HttpPostedFile.cs
- EditorPartCollection.cs
- ResourceProperty.cs
- ButtonAutomationPeer.cs
- TemplateControlBuildProvider.cs
- CultureSpecificStringDictionary.cs
- SecurityValidationBehavior.cs
- SmtpTransport.cs
- MenuCommands.cs
- XAMLParseException.cs
- ListViewSortEventArgs.cs
- XmlNode.cs
- ListViewItemEventArgs.cs
- ListViewItemEventArgs.cs
- TextElementCollectionHelper.cs
- ManagedWndProcTracker.cs
- CultureMapper.cs
- VisualStateChangedEventArgs.cs
- ExceptionUtility.cs
- VisualTreeUtils.cs
- TransactionScopeDesigner.cs
- Substitution.cs
- PersonalizationAdministration.cs
- Propagator.Evaluator.cs
- Helpers.cs
- CodeNamespaceImportCollection.cs
- UserPreference.cs
- base64Transforms.cs
- SemaphoreFullException.cs
- JoinTreeNode.cs
- ComAdminInterfaces.cs
- WhereaboutsReader.cs
- RemoteEndpointMessageProperty.cs
- MultipleViewProviderWrapper.cs
- ScriptModule.cs
- MD5Cng.cs
- ReturnValue.cs
- BypassElementCollection.cs
- RangeContentEnumerator.cs
- ItemContainerGenerator.cs
- Rotation3DAnimation.cs
- XamlFigureLengthSerializer.cs
- ExternalFile.cs
- UIAgentMonitorHandle.cs
- Pkcs9Attribute.cs
- Rect3D.cs
- ObjectStorage.cs
- ElementAtQueryOperator.cs
- ButtonChrome.cs
- ThemeableAttribute.cs
- XmlEntityReference.cs
- TextTreeRootNode.cs
- NegotiationTokenProvider.cs
- CodePropertyReferenceExpression.cs
- LoadedEvent.cs
- RuntimeDelegateArgument.cs
- NavigationWindowAutomationPeer.cs
- ProfileGroupSettings.cs
- FontFamilyIdentifier.cs
- LinkButton.cs
- FontSource.cs
- PartitionedDataSource.cs
- WebPartConnectVerb.cs
- ListBox.cs
- ControlIdConverter.cs
- PriorityBinding.cs
- GlobalProxySelection.cs
- ReaderWriterLock.cs
- RetrieveVirtualItemEventArgs.cs
- ArrangedElement.cs
- FormatConvertedBitmap.cs
- VectorCollectionConverter.cs
- RootProfilePropertySettingsCollection.cs
- ControlTemplate.cs
- Boolean.cs
- Cursor.cs
- Operand.cs
- PassportAuthenticationModule.cs
- LessThanOrEqual.cs
- TemplateDefinition.cs
- ToolboxDataAttribute.cs