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
- SqlNodeAnnotations.cs
- ExecutionContext.cs
- ThumbButtonInfoCollection.cs
- WeakHashtable.cs
- WindowsTokenRoleProvider.cs
- ColumnResult.cs
- ColorAnimationBase.cs
- TextEffect.cs
- GridViewRowPresenter.cs
- RecognizedPhrase.cs
- TextMarkerSource.cs
- CodeGenerator.cs
- RowBinding.cs
- TrackingMemoryStreamFactory.cs
- AnnotationComponentManager.cs
- ArgumentDesigner.xaml.cs
- TreeNodeBinding.cs
- HtmlHead.cs
- SafeRegistryKey.cs
- DataColumnChangeEvent.cs
- TraceFilter.cs
- DataGridTableCollection.cs
- GlyphingCache.cs
- MLangCodePageEncoding.cs
- AmbientValueAttribute.cs
- WorkflowDebuggerSteppingAttribute.cs
- IDispatchConstantAttribute.cs
- FixedPageProcessor.cs
- XPathEmptyIterator.cs
- ForceCopyBuildProvider.cs
- WsrmMessageInfo.cs
- TypedReference.cs
- QilGeneratorEnv.cs
- WebServicesInteroperability.cs
- StylusEditingBehavior.cs
- UrlPath.cs
- ProtocolsConfiguration.cs
- DesignerDataConnection.cs
- SingleKeyFrameCollection.cs
- OperationCanceledException.cs
- XmlReflectionMember.cs
- ConvertTextFrag.cs
- HtmlTernaryTree.cs
- SQLMoneyStorage.cs
- AccessControlList.cs
- DbConnectionPoolGroup.cs
- LocalizableAttribute.cs
- BrowserCapabilitiesCodeGenerator.cs
- Thumb.cs
- _SingleItemRequestCache.cs
- DbConnectionHelper.cs
- StylusCaptureWithinProperty.cs
- Color.cs
- BrushValueSerializer.cs
- _DomainName.cs
- LogicalExpr.cs
- RuleEngine.cs
- QilStrConcat.cs
- AutoResetEvent.cs
- RelationshipNavigation.cs
- PasswordBoxAutomationPeer.cs
- ConditionalAttribute.cs
- WebPartCloseVerb.cs
- FigureHelper.cs
- TypographyProperties.cs
- DataGridViewSortCompareEventArgs.cs
- Parameter.cs
- EventLogEntryCollection.cs
- Image.cs
- MetadataResolver.cs
- _NestedSingleAsyncResult.cs
- TransactedReceiveData.cs
- StreamingContext.cs
- ColumnResult.cs
- PerformanceCounterLib.cs
- PersistenceProviderElement.cs
- TableCell.cs
- EventManager.cs
- DataServiceRequestArgs.cs
- PathParser.cs
- XmlSchemaAnnotation.cs
- DesignBindingConverter.cs
- SoapDocumentServiceAttribute.cs
- XmlCDATASection.cs
- DirectoryObjectSecurity.cs
- ResourceDescriptionAttribute.cs
- OleDbCommandBuilder.cs
- OperationCanceledException.cs
- GenericXmlSecurityToken.cs
- CodeGenerationManager.cs
- WindowClosedEventArgs.cs
- PointValueSerializer.cs
- DependencyPropertyKind.cs
- IPGlobalProperties.cs
- ListViewCommandEventArgs.cs
- Clipboard.cs
- DependencyObjectProvider.cs
- SafeNativeMethods.cs
- LocalizationCodeDomSerializer.cs
- PrintSchema.cs