Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Int16Converter.cs / 1305376 / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RectIndependentAnimationStorage.cs
- FormatConvertedBitmap.cs
- Pair.cs
- TextRange.cs
- Timer.cs
- PresentationSource.cs
- RecordManager.cs
- SRDisplayNameAttribute.cs
- NamespaceCollection.cs
- MarkupCompilePass2.cs
- HostedController.cs
- Line.cs
- CreateUserWizardStep.cs
- BinaryObjectReader.cs
- PeerContact.cs
- CodeTypeConstructor.cs
- GridViewCellAutomationPeer.cs
- XmlTextAttribute.cs
- CommandLibraryHelper.cs
- ScalarOps.cs
- Delay.cs
- RuleSettingsCollection.cs
- EmptyStringExpandableObjectConverter.cs
- DateRangeEvent.cs
- FigureHelper.cs
- XmlDomTextWriter.cs
- PeerContact.cs
- CheckBoxStandardAdapter.cs
- AuthenticationManager.cs
- PageVisual.cs
- FileRecordSequence.cs
- basevalidator.cs
- Size.cs
- VisualStyleRenderer.cs
- KerberosTicketHashIdentifierClause.cs
- _SSPIWrapper.cs
- QuarticEase.cs
- BindingListCollectionView.cs
- AsyncPostBackTrigger.cs
- CryptoStream.cs
- FontFamilyIdentifier.cs
- StrictAndMessageFilter.cs
- CompiledQuery.cs
- PlainXmlDeserializer.cs
- ObservableDictionary.cs
- WindowsListViewScroll.cs
- Accessible.cs
- BatchWriter.cs
- FlowDocumentPaginator.cs
- BamlStream.cs
- LambdaCompiler.ControlFlow.cs
- ObjectDataSourceEventArgs.cs
- ProjectionCamera.cs
- DependencyPropertyHelper.cs
- SafeLocalMemHandle.cs
- DataIdProcessor.cs
- Drawing.cs
- PageContentAsyncResult.cs
- ListViewGroupItemCollection.cs
- AsyncResult.cs
- TableCell.cs
- BinaryReader.cs
- XpsDocumentEvent.cs
- MediaTimeline.cs
- X509ChainElement.cs
- GridSplitter.cs
- UrlRoutingHandler.cs
- TextFormatter.cs
- WindowsListViewItemStartMenu.cs
- OleDbException.cs
- HandlerBase.cs
- _HeaderInfoTable.cs
- X509CertificateCollection.cs
- HtmlHead.cs
- WorkflowLayouts.cs
- MembershipPasswordException.cs
- MediaPlayerState.cs
- UriScheme.cs
- TrackingLocation.cs
- MdiWindowListStrip.cs
- TimeIntervalCollection.cs
- DefaultBinder.cs
- AmbientLight.cs
- followingsibling.cs
- SqlCommandSet.cs
- TrustManagerMoreInformation.cs
- CancelEventArgs.cs
- SerialPinChanges.cs
- NativeActivityContext.cs
- AppDomainGrammarProxy.cs
- Material.cs
- DataGridViewTopLeftHeaderCell.cs
- Mutex.cs
- TableItemStyle.cs
- TextElementEditingBehaviorAttribute.cs
- MimePart.cs
- MulticastOption.cs
- FeatureSupport.cs
- SpellerInterop.cs
- UrlPropertyAttribute.cs