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
- WebPartConnection.cs
- SqlDelegatedTransaction.cs
- GlyphCollection.cs
- RestClientProxyHandler.cs
- Control.cs
- FormViewRow.cs
- DocumentViewerBase.cs
- CategoryAttribute.cs
- ClipboardProcessor.cs
- StyleXamlParser.cs
- AttachedPropertyDescriptor.cs
- WebControl.cs
- XmlHierarchicalEnumerable.cs
- UnsafeNativeMethods.cs
- KeyedHashAlgorithm.cs
- KoreanCalendar.cs
- Privilege.cs
- CallbackBehaviorAttribute.cs
- ADMembershipProvider.cs
- SqlSelectStatement.cs
- ListQueryResults.cs
- CheckoutException.cs
- InstanceLockedException.cs
- SecureConversationServiceCredential.cs
- Pair.cs
- BulletedListEventArgs.cs
- wgx_render.cs
- CheckBoxRenderer.cs
- ScriptControlDescriptor.cs
- ValidateNames.cs
- SqlReorderer.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- DataControlCommands.cs
- XsltOutput.cs
- PageThemeBuildProvider.cs
- Queue.cs
- TrackingProfileManager.cs
- ActiveXHost.cs
- SchemaElement.cs
- BuildProviderUtils.cs
- NamespaceInfo.cs
- TextBox.cs
- EntityViewContainer.cs
- SecurityHelper.cs
- RepeatInfo.cs
- DBPropSet.cs
- DataTransferEventArgs.cs
- ServiceMetadataPublishingElement.cs
- Property.cs
- TransformGroup.cs
- XmlDocumentFragment.cs
- GeometryDrawing.cs
- IPipelineRuntime.cs
- ZipIOCentralDirectoryFileHeader.cs
- Symbol.cs
- TextTreeTextNode.cs
- DragStartedEventArgs.cs
- ParameterModifier.cs
- DataGridViewDataErrorEventArgs.cs
- StdValidatorsAndConverters.cs
- DependencyPropertyHelper.cs
- CallId.cs
- AppDomainManager.cs
- TransactionContextValidator.cs
- LoggedException.cs
- EntityDataSourceSelectingEventArgs.cs
- WindowsTab.cs
- NetNamedPipeBindingCollectionElement.cs
- XmlSerializerVersionAttribute.cs
- StringUtil.cs
- IconBitmapDecoder.cs
- CorrelationHandle.cs
- ListView.cs
- _NestedMultipleAsyncResult.cs
- Serializer.cs
- RegexStringValidator.cs
- COM2ComponentEditor.cs
- XmlHierarchyData.cs
- ListenerConnectionModeReader.cs
- CodeTypeMember.cs
- UpdateManifestForBrowserApplication.cs
- VisualCollection.cs
- TextSegment.cs
- AppSecurityManager.cs
- SizeAnimationBase.cs
- XmlILAnnotation.cs
- Int32CollectionValueSerializer.cs
- StorageScalarPropertyMapping.cs
- CharacterHit.cs
- StorageMappingFragment.cs
- HandleScope.cs
- FormViewDeletedEventArgs.cs
- BmpBitmapDecoder.cs
- TransformGroup.cs
- InvokeGenerator.cs
- ListControl.cs
- PLINQETWProvider.cs
- TraceUtility.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ActiveXHost.cs