Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- HwndSubclass.cs
- SqlUdtInfo.cs
- ChangeToolStripParentVerb.cs
- PanelDesigner.cs
- ZipArchive.cs
- _RegBlobWebProxyDataBuilder.cs
- DataGridAddNewRow.cs
- QueryCacheEntry.cs
- Matrix3D.cs
- AbstractExpressions.cs
- IgnorePropertiesAttribute.cs
- BCLDebug.cs
- XmlUtf8RawTextWriter.cs
- PagesSection.cs
- Int32Converter.cs
- TypeUsage.cs
- AnnotationHelper.cs
- ControlDesigner.cs
- HexParser.cs
- Assembly.cs
- ScheduleChanges.cs
- ServiceOperationParameter.cs
- Figure.cs
- CompatibleIComparer.cs
- KeyboardDevice.cs
- SHA384.cs
- DesignerRegionCollection.cs
- TextRangeEditLists.cs
- CatalogZoneBase.cs
- AppearanceEditorPart.cs
- IisTraceWebEventProvider.cs
- ADConnectionHelper.cs
- TrustSection.cs
- ZoneButton.cs
- AppPool.cs
- _TimerThread.cs
- TriggerAction.cs
- ApplicationServiceHelper.cs
- PipelineComponent.cs
- TextEffect.cs
- XmlNullResolver.cs
- XmlTextEncoder.cs
- DataView.cs
- DocumentViewerHelper.cs
- DirectoryRedirect.cs
- ValidationSettings.cs
- BinHexDecoder.cs
- ProfilePropertySettings.cs
- ServiceEndpointAssociationProvider.cs
- Sentence.cs
- DataTableCollection.cs
- ADConnectionHelper.cs
- SqlConnectionFactory.cs
- Button.cs
- ValidatorCompatibilityHelper.cs
- ListViewUpdateEventArgs.cs
- XDRSchema.cs
- JournalEntryStack.cs
- DefaultTraceListener.cs
- SizeF.cs
- EdmComplexTypeAttribute.cs
- ServiceMemoryGates.cs
- RecognizedPhrase.cs
- HttpListenerResponse.cs
- SingleAnimation.cs
- SmiContextFactory.cs
- MissingManifestResourceException.cs
- FormsAuthenticationUser.cs
- UInt16Storage.cs
- TemplateModeChangedEventArgs.cs
- InitializationEventAttribute.cs
- Convert.cs
- DropShadowEffect.cs
- QueryContinueDragEventArgs.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ExpressionList.cs
- KeyProperty.cs
- ParameterElementCollection.cs
- PageContentCollection.cs
- CompiledAction.cs
- SocketAddress.cs
- BlockCollection.cs
- AnimatedTypeHelpers.cs
- FactoryGenerator.cs
- ObjectDataSourceChooseMethodsPanel.cs
- ContentOperations.cs
- RequestTimeoutManager.cs
- KeyInterop.cs
- ConvertTextFrag.cs
- LinqDataSourceDeleteEventArgs.cs
- RequiredArgumentAttribute.cs
- MsmqVerifier.cs
- OrderedDictionary.cs
- BindingWorker.cs
- UpdateCommandGenerator.cs
- Int64.cs
- ToolStripContainer.cs
- SerTrace.cs
- Iis7Helper.cs
- DeclarativeCatalogPart.cs