Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- EventDriven.cs
- BooleanFunctions.cs
- CodeDirectionExpression.cs
- ReflectionServiceProvider.cs
- MediaTimeline.cs
- TextEncodedRawTextWriter.cs
- BaseTreeIterator.cs
- PropertyEntry.cs
- ActivationArguments.cs
- TTSEvent.cs
- EditorPart.cs
- MediaContextNotificationWindow.cs
- SqlClientPermission.cs
- SmiContextFactory.cs
- IdnMapping.cs
- SendingRequestEventArgs.cs
- BaseCollection.cs
- x509store.cs
- WindowsScrollBar.cs
- Missing.cs
- TileBrush.cs
- recordstatescratchpad.cs
- wgx_commands.cs
- FilterableAttribute.cs
- XmlSchemaSimpleTypeList.cs
- ServiceModelActivationSectionGroup.cs
- RSACryptoServiceProvider.cs
- DesignerTransactionCloseEvent.cs
- DataSourceSelectArguments.cs
- DataGridViewComboBoxEditingControl.cs
- StreamInfo.cs
- Currency.cs
- OrderByLifter.cs
- UnicodeEncoding.cs
- OrCondition.cs
- ObjectStateManager.cs
- OdbcHandle.cs
- StrokeNodeEnumerator.cs
- MailMessageEventArgs.cs
- ActivityInterfaces.cs
- WinInetCache.cs
- Partitioner.cs
- XmlEventCache.cs
- RelatedPropertyManager.cs
- MarkedHighlightComponent.cs
- Region.cs
- HwndSource.cs
- XDeferredAxisSource.cs
- NewArrayExpression.cs
- QueryResponse.cs
- HttpHeaderCollection.cs
- X509SecurityToken.cs
- XmlNamespaceDeclarationsAttribute.cs
- TrackingServices.cs
- ColorDialog.cs
- EasingFunctionBase.cs
- Int32KeyFrameCollection.cs
- SmiContext.cs
- handlecollector.cs
- SelectionItemProviderWrapper.cs
- SelectedDatesCollection.cs
- WebScriptEnablingElement.cs
- TypeDescriptor.cs
- AutomationPatternInfo.cs
- ScrollContentPresenter.cs
- ManagementClass.cs
- NullableDecimalSumAggregationOperator.cs
- Triplet.cs
- PostBackOptions.cs
- XamlReader.cs
- InternalControlCollection.cs
- PointConverter.cs
- DataService.cs
- ListBindingHelper.cs
- ScriptDescriptor.cs
- ThreadStaticAttribute.cs
- DtdParser.cs
- HandlerBase.cs
- AppSettingsReader.cs
- URLMembershipCondition.cs
- MouseOverProperty.cs
- ClientEventManager.cs
- XpsTokenContext.cs
- Assembly.cs
- SafeNativeMethods.cs
- XmlSerializerSection.cs
- AdapterUtil.cs
- FillBehavior.cs
- ToolStripLocationCancelEventArgs.cs
- SymbolType.cs
- SchemaTypeEmitter.cs
- PackageFilter.cs
- ExpressionPrinter.cs
- EmptyQuery.cs
- StringFunctions.cs
- DuplicateDetector.cs
- SizeAnimationBase.cs
- MappingException.cs
- RegexReplacement.cs
- DoubleCollectionValueSerializer.cs