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
- QueryCacheEntry.cs
- BitmapImage.cs
- HwndSourceKeyboardInputSite.cs
- rsa.cs
- PropertiesTab.cs
- XmlAttributeAttribute.cs
- processwaithandle.cs
- UnsafeNativeMethods.cs
- AstNode.cs
- GridViewCancelEditEventArgs.cs
- OleStrCAMarshaler.cs
- WebPartHeaderCloseVerb.cs
- HtmlInputButton.cs
- WindowsFormsLinkLabel.cs
- TabControlCancelEvent.cs
- FtpWebResponse.cs
- _SslStream.cs
- FlowDocumentPageViewerAutomationPeer.cs
- XmlDataSourceNodeDescriptor.cs
- WebServiceHostFactory.cs
- GroupLabel.cs
- HttpHostedTransportConfiguration.cs
- ExpressionWriter.cs
- XmlQueryCardinality.cs
- UIElement.cs
- WaitForChangedResult.cs
- AssemblyHash.cs
- ItemAutomationPeer.cs
- AssemblyBuilder.cs
- Clock.cs
- Section.cs
- DataGridPageChangedEventArgs.cs
- HttpModulesInstallComponent.cs
- OSFeature.cs
- TableItemPatternIdentifiers.cs
- IntPtr.cs
- ConfigurationValidatorAttribute.cs
- GestureRecognizer.cs
- MemberDomainMap.cs
- SecurityTokenResolver.cs
- DbMetaDataFactory.cs
- AsyncOperation.cs
- XamlVector3DCollectionSerializer.cs
- XhtmlBasicObjectListAdapter.cs
- PropertyValueUIItem.cs
- HitTestWithPointDrawingContextWalker.cs
- UICuesEvent.cs
- GlobalizationSection.cs
- ChainOfResponsibility.cs
- DataGridViewHitTestInfo.cs
- EventBindingService.cs
- ShutDownListener.cs
- CodePrimitiveExpression.cs
- InvalidWMPVersionException.cs
- TextDecorations.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- DefaultMemberAttribute.cs
- XamlHostingConfiguration.cs
- EdmComplexPropertyAttribute.cs
- FontStretch.cs
- SmuggledIUnknown.cs
- TrustLevelCollection.cs
- MemberExpression.cs
- WrappingXamlSchemaContext.cs
- OLEDB_Enum.cs
- Keyboard.cs
- NegotiateStream.cs
- FrameworkTextComposition.cs
- MembershipUser.cs
- SpotLight.cs
- SmtpAuthenticationManager.cs
- TableLayout.cs
- SecurityRuntime.cs
- FieldBuilder.cs
- LogWriteRestartAreaState.cs
- StylusShape.cs
- DateTimeUtil.cs
- EnumDataContract.cs
- TypeDependencyAttribute.cs
- WebReferencesBuildProvider.cs
- CustomSignedXml.cs
- KeyConverter.cs
- InputReport.cs
- SynchronousSendBindingElement.cs
- PublisherIdentityPermission.cs
- Vector3DKeyFrameCollection.cs
- Utils.cs
- CachingHintValidation.cs
- ResolveMatches11.cs
- RenamedEventArgs.cs
- AttributeUsageAttribute.cs
- HttpCapabilitiesBase.cs
- EmptyTextWriter.cs
- XmlLinkedNode.cs
- EditorPartCollection.cs
- Membership.cs
- Random.cs
- ViewStateModeByIdAttribute.cs
- WindowsListViewItemStartMenu.cs
- RootBrowserWindowAutomationPeer.cs