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
- InheritablePropertyChangeInfo.cs
- BeginStoryboard.cs
- PersistChildrenAttribute.cs
- EmptyEnumerator.cs
- RefreshEventArgs.cs
- ServiceModelConfigurationSectionGroup.cs
- SettingsAttributeDictionary.cs
- ProviderBase.cs
- ApplicationFileParser.cs
- SudsCommon.cs
- RtfToken.cs
- ConnectionStringSettings.cs
- DataRowChangeEvent.cs
- GroupBox.cs
- DocumentApplicationJournalEntry.cs
- WS2007FederationHttpBinding.cs
- DbgUtil.cs
- DesignerLabelAdapter.cs
- DBDataPermissionAttribute.cs
- DesignBindingConverter.cs
- GestureRecognitionResult.cs
- RSAPKCS1SignatureFormatter.cs
- DeferredSelectedIndexReference.cs
- mda.cs
- DispatcherFrame.cs
- LinqDataSourceContextData.cs
- TreeViewImageKeyConverter.cs
- FlagPanel.cs
- MenuItem.cs
- ReachObjectContext.cs
- DoubleAnimation.cs
- PrintDocument.cs
- PointLightBase.cs
- GraphicsState.cs
- ModelPropertyCollectionImpl.cs
- InternalUserCancelledException.cs
- TraceEventCache.cs
- ImageSource.cs
- CacheChildrenQuery.cs
- NullEntityWrapper.cs
- arclist.cs
- Point3DCollectionConverter.cs
- FontEmbeddingManager.cs
- DoubleAnimationUsingPath.cs
- QilDataSource.cs
- TextPatternIdentifiers.cs
- RenderData.cs
- XmlAutoDetectWriter.cs
- DataGridViewCellConverter.cs
- UseLicense.cs
- BlurEffect.cs
- CompatibleIComparer.cs
- WorkflowViewElement.cs
- GeneratedCodeAttribute.cs
- GiveFeedbackEventArgs.cs
- RootProfilePropertySettingsCollection.cs
- HtmlFormWrapper.cs
- ThaiBuddhistCalendar.cs
- EndpointAddressElementBase.cs
- ArgIterator.cs
- BindingMemberInfo.cs
- QueryExpr.cs
- DayRenderEvent.cs
- TokenBasedSet.cs
- Int32RectConverter.cs
- _NestedSingleAsyncResult.cs
- FtpCachePolicyElement.cs
- MembershipValidatePasswordEventArgs.cs
- SqlSelectStatement.cs
- ObjectTokenCategory.cs
- CollectionExtensions.cs
- SqlDataSourceQueryEditorForm.cs
- RuntimeEnvironment.cs
- GestureRecognitionResult.cs
- AssemblyFilter.cs
- RoleManagerModule.cs
- Schedule.cs
- CacheAxisQuery.cs
- AppSettingsSection.cs
- ResourceExpressionEditor.cs
- WmlMobileTextWriter.cs
- WindowsListBox.cs
- WebControlToolBoxItem.cs
- ContentFileHelper.cs
- ContextDataSource.cs
- AutomationElement.cs
- Visual3DCollection.cs
- SafeNativeMethods.cs
- ListView.cs
- ServicePointManagerElement.cs
- StateRuntime.cs
- ExecutionScope.cs
- ValidatorCompatibilityHelper.cs
- MemberCollection.cs
- XpsViewerException.cs
- ColorMap.cs
- ThreadExceptionEvent.cs
- DataSourceHelper.cs
- SecUtil.cs
- DataGrid.cs