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
- HtmlTextViewAdapter.cs
- CustomValidator.cs
- Win32MouseDevice.cs
- UserPreferenceChangingEventArgs.cs
- M3DUtil.cs
- ToolStripContainerDesigner.cs
- CustomTokenProvider.cs
- ProgressBar.cs
- SoundPlayerAction.cs
- ResourceSetExpression.cs
- Animatable.cs
- SourceFileBuildProvider.cs
- TypedElement.cs
- DataGridViewButtonCell.cs
- PathSegment.cs
- VectorValueSerializer.cs
- infer.cs
- OdbcDataReader.cs
- XmlTextAttribute.cs
- ProfileManager.cs
- ImportCatalogPart.cs
- Point3DAnimationUsingKeyFrames.cs
- QueryExpr.cs
- ServiceOperation.cs
- WindowsSolidBrush.cs
- CompModSwitches.cs
- ListBox.cs
- BuiltInExpr.cs
- EventMemberCodeDomSerializer.cs
- dbdatarecord.cs
- XMLSyntaxException.cs
- HtmlSelectionListAdapter.cs
- DuplexSecurityProtocolFactory.cs
- ConfigXmlText.cs
- HtmlTableRow.cs
- FixedLineResult.cs
- ZipIOExtraField.cs
- CompilerResults.cs
- Crc32Helper.cs
- ParameterInfo.cs
- PlatformCulture.cs
- BevelBitmapEffect.cs
- basenumberconverter.cs
- MetabaseSettingsIis7.cs
- DataGridViewTextBoxColumn.cs
- InternalReceiveMessage.cs
- ViewBox.cs
- Substitution.cs
- CachedPathData.cs
- BitmapEffectDrawingContextWalker.cs
- IgnoreDeviceFilterElement.cs
- XmlCodeExporter.cs
- DataGridViewBand.cs
- coordinator.cs
- RotationValidation.cs
- SapiRecognizer.cs
- SchemaInfo.cs
- ParallelTimeline.cs
- _ScatterGatherBuffers.cs
- ConfigXmlElement.cs
- BindingGroup.cs
- XamlFilter.cs
- ServiceModelPerformanceCounters.cs
- WebPartConnectionsConfigureVerb.cs
- DataListItemCollection.cs
- TemplatedMailWebEventProvider.cs
- SqlBulkCopyColumnMapping.cs
- XPathNodeList.cs
- UniqueID.cs
- DocumentPage.cs
- StateWorkerRequest.cs
- ManipulationStartingEventArgs.cs
- HttpProtocolReflector.cs
- Odbc32.cs
- XmlCharCheckingWriter.cs
- CustomLineCap.cs
- Merger.cs
- TraceHandlerErrorFormatter.cs
- TransformerConfigurationWizardBase.cs
- StorageInfo.cs
- DecoderFallback.cs
- FixedStringLookup.cs
- ToolboxComponentsCreatedEventArgs.cs
- DrawListViewSubItemEventArgs.cs
- BitmapScalingModeValidation.cs
- PersonalizationProvider.cs
- UncommonField.cs
- SizeConverter.cs
- DesignerActionVerbItem.cs
- FileDataSourceCache.cs
- NamedObject.cs
- SizeConverter.cs
- XhtmlBasicValidationSummaryAdapter.cs
- BitHelper.cs
- LogicalExpr.cs
- EntityDataSourceColumn.cs
- DataControlImageButton.cs
- WinEventQueueItem.cs
- DataRowChangeEvent.cs
- ColumnPropertiesGroup.cs