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
- Vector3dCollection.cs
- DecimalConstantAttribute.cs
- TreeView.cs
- VisualTreeFlattener.cs
- SerialPort.cs
- TempEnvironment.cs
- Logging.cs
- OracleParameterCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- ObservableDictionary.cs
- TimerElapsedEvenArgs.cs
- StrokeCollectionDefaultValueFactory.cs
- DataReaderContainer.cs
- Geometry.cs
- _IPv6Address.cs
- Compress.cs
- DbConnectionPoolCounters.cs
- UnsupportedPolicyOptionsException.cs
- TabPageDesigner.cs
- FormViewPagerRow.cs
- ShutDownListener.cs
- DataListItemEventArgs.cs
- IISMapPath.cs
- IgnoreFlushAndCloseStream.cs
- TypeDelegator.cs
- XmlChildEnumerator.cs
- SessionIDManager.cs
- WebPartConnectionsConnectVerb.cs
- ExpressionHelper.cs
- ListItemConverter.cs
- OdbcParameterCollection.cs
- MethodBuilder.cs
- PropVariant.cs
- XmlILTrace.cs
- TextBoxAutoCompleteSourceConverter.cs
- SoapObjectWriter.cs
- CodeTypeReference.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ObjectDisposedException.cs
- MimeWriter.cs
- SessionStateItemCollection.cs
- DefaultEventAttribute.cs
- StyleBamlRecordReader.cs
- SQLDecimal.cs
- GeometryGroup.cs
- XmlSchemaSimpleTypeUnion.cs
- WebPartUserCapability.cs
- FileSystemWatcher.cs
- DataGridViewCellStateChangedEventArgs.cs
- TextDecorationCollection.cs
- TemplateFactory.cs
- Wildcard.cs
- ServiceObjectContainer.cs
- SystemNetHelpers.cs
- XmlDesigner.cs
- HttpProfileGroupBase.cs
- AssemblyResourceLoader.cs
- OleDbTransaction.cs
- XhtmlBasicTextViewAdapter.cs
- UnmanagedMemoryStream.cs
- DesignerView.xaml.cs
- StateMachineSubscriptionManager.cs
- XpsPackagingException.cs
- FocusWithinProperty.cs
- ColumnBinding.cs
- XmlIlTypeHelper.cs
- CollectionChangeEventArgs.cs
- UnsafeNativeMethods.cs
- RuleAction.cs
- DeploymentExceptionMapper.cs
- _Connection.cs
- ControlUtil.cs
- XsltInput.cs
- InvalidAsynchronousStateException.cs
- InfoCardSymmetricCrypto.cs
- QilScopedVisitor.cs
- PermissionSetTriple.cs
- KeyBinding.cs
- ConfigUtil.cs
- PathSegment.cs
- XmlSchemaAll.cs
- ChildrenQuery.cs
- UserCancellationException.cs
- DataGridRelationshipRow.cs
- DataFormats.cs
- FileSystemEventArgs.cs
- WebPartsSection.cs
- Trace.cs
- SortedDictionary.cs
- NextPreviousPagerField.cs
- PenLineJoinValidation.cs
- ISessionStateStore.cs
- DesignerActionVerbList.cs
- AccessDataSource.cs
- ReachFixedPageSerializer.cs
- HostProtectionPermission.cs
- EventRecordWrittenEventArgs.cs
- CssTextWriter.cs
- ToolStripContainer.cs
- WindowsClaimSet.cs