Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / ComponentModel / SByteConverter.cs / 1 / SByteConverter.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 SByteConverter : BaseNumberConverter { ///Provides a /// type converter to convert 8-bit unsigned /// 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(SByte); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToSByte(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return SByte.Parse(value, NumberStyles.Integer, formatInfo); } ////// Convert the given value to a string using the given CultureInfo /// internal override object FromString(string value, CultureInfo culture){ return SByte.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((SByte)value).ToString("G", formatInfo); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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 SByteConverter : BaseNumberConverter { ///Provides a /// type converter to convert 8-bit unsigned /// 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(SByte); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToSByte(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return SByte.Parse(value, NumberStyles.Integer, formatInfo); } ////// Convert the given value to a string using the given CultureInfo /// internal override object FromString(string value, CultureInfo culture){ return SByte.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((SByte)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
- GlyphRunDrawing.cs
- CompoundFileReference.cs
- CultureSpecificStringDictionary.cs
- DocumentsTrace.cs
- Material.cs
- CollectionTypeElement.cs
- BezierSegment.cs
- HtmlUtf8RawTextWriter.cs
- CaseInsensitiveOrdinalStringComparer.cs
- X509InitiatorCertificateServiceElement.cs
- DataChangedEventManager.cs
- CryptoConfig.cs
- Binding.cs
- OrthographicCamera.cs
- _DisconnectOverlappedAsyncResult.cs
- COM2ExtendedBrowsingHandler.cs
- WindowsFormsDesignerOptionService.cs
- CustomWebEventKey.cs
- TextFormatterContext.cs
- DiagnosticTraceSource.cs
- HyperLinkField.cs
- ValueUnavailableException.cs
- Form.cs
- WebPart.cs
- PartialToken.cs
- DocumentApplication.cs
- QueryOperatorEnumerator.cs
- FunctionNode.cs
- SynchronizationLockException.cs
- GetPageCompletedEventArgs.cs
- SqlCachedBuffer.cs
- BrowsableAttribute.cs
- SafeProcessHandle.cs
- DefaultEventAttribute.cs
- AttributeCollection.cs
- Int32EqualityComparer.cs
- DocumentEventArgs.cs
- NavigationService.cs
- COM2ExtendedBrowsingHandler.cs
- Point4DConverter.cs
- ListControlConvertEventArgs.cs
- AccessedThroughPropertyAttribute.cs
- BinaryUtilClasses.cs
- ToolBar.cs
- MessageTraceRecord.cs
- ColumnCollection.cs
- PageClientProxyGenerator.cs
- DefaultValueConverter.cs
- VisualStateGroup.cs
- DataGridColumnCollection.cs
- SchemaSetCompiler.cs
- EditCommandColumn.cs
- Util.cs
- HttpSessionStateBase.cs
- ImageBrush.cs
- DataServiceStreamProviderWrapper.cs
- PrintController.cs
- DetailsViewUpdateEventArgs.cs
- CommonDialog.cs
- CircleHotSpot.cs
- XmlBinaryReader.cs
- PlainXmlDeserializer.cs
- ColorConvertedBitmapExtension.cs
- Enum.cs
- ResXBuildProvider.cs
- TextBoxDesigner.cs
- DataGridViewColumnEventArgs.cs
- ToolStripContentPanel.cs
- CollectionContainer.cs
- TraceListener.cs
- KeySpline.cs
- DataBoundControlAdapter.cs
- MatrixTransform.cs
- EraserBehavior.cs
- SpeechRecognitionEngine.cs
- NavigationCommands.cs
- AspCompat.cs
- wmiprovider.cs
- BinHexEncoder.cs
- CheckBox.cs
- arabicshape.cs
- DataSourceViewSchemaConverter.cs
- HatchBrush.cs
- TableLayoutStyle.cs
- FragmentQueryProcessor.cs
- PrintingPermission.cs
- SerialErrors.cs
- WebPartDisplayMode.cs
- Utilities.cs
- DbConnectionStringBuilder.cs
- CatalogPartChrome.cs
- X509Certificate2Collection.cs
- SqlTypeConverter.cs
- HttpModuleCollection.cs
- DynamicRendererThreadManager.cs
- DataSysAttribute.cs
- FamilyTypefaceCollection.cs
- CorruptStoreException.cs
- PaintValueEventArgs.cs
- ContextActivityUtils.cs