Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Point3DValueSerializer.cs
- DelegatedStream.cs
- PerfService.cs
- DispatchWrapper.cs
- FtpCachePolicyElement.cs
- DataGridViewColumnConverter.cs
- DataControlFieldHeaderCell.cs
- SpeechDetectedEventArgs.cs
- UserThread.cs
- ObjectItemAttributeAssemblyLoader.cs
- Native.cs
- UniqueIdentifierService.cs
- Accessible.cs
- TextRangeSerialization.cs
- StylusDownEventArgs.cs
- Renderer.cs
- NewExpression.cs
- XmlHierarchicalDataSourceView.cs
- SimpleRecyclingCache.cs
- WebExceptionStatus.cs
- DBCommand.cs
- COM2ExtendedUITypeEditor.cs
- Line.cs
- HandleTable.cs
- ResourceReferenceExpression.cs
- RemotingServices.cs
- FontCacheLogic.cs
- DocumentPage.cs
- DbParameterHelper.cs
- PropertyItem.cs
- DataSourceControlBuilder.cs
- BrowserDefinitionCollection.cs
- ActiveXHelper.cs
- XmlEnumAttribute.cs
- DataView.cs
- UnsafeNativeMethods.cs
- XomlCompilerError.cs
- HiddenField.cs
- ChannelBuilder.cs
- SafeNativeMethods.cs
- Expander.cs
- DbConnectionClosed.cs
- ModelPerspective.cs
- TimeSpanOrInfiniteValidator.cs
- QueryOperator.cs
- NgenServicingAttributes.cs
- DataListItem.cs
- SvcMapFileSerializer.cs
- Socket.cs
- SystemInformation.cs
- GetLedgerRequest.cs
- BooleanKeyFrameCollection.cs
- SelectionChangedEventArgs.cs
- KerberosSecurityTokenAuthenticator.cs
- GCHandleCookieTable.cs
- SessionStateUtil.cs
- Baml2006KnownTypes.cs
- ComponentChangingEvent.cs
- KeyedCollection.cs
- _LazyAsyncResult.cs
- ProfileSettings.cs
- HttpConfigurationContext.cs
- AutoFocusStyle.xaml.cs
- CompleteWizardStep.cs
- WindowsGrip.cs
- PopupRootAutomationPeer.cs
- SqlDataSourceCommandEventArgs.cs
- WindowsImpersonationContext.cs
- XmlDataSource.cs
- TextWriter.cs
- TemplateBamlTreeBuilder.cs
- ObjectSet.cs
- XsdBuildProvider.cs
- SessionSwitchEventArgs.cs
- BooleanFunctions.cs
- ConnectionInterfaceCollection.cs
- UdpChannelListener.cs
- UTF7Encoding.cs
- PreDigestedSignedInfo.cs
- XmlSchemaFacet.cs
- OverflowException.cs
- ObjectParameterCollection.cs
- TableRowGroupCollection.cs
- StatusBar.cs
- CodeGroup.cs
- ContainerUtilities.cs
- TitleStyle.cs
- Camera.cs
- ActivityExecutionContextCollection.cs
- SqlNotificationRequest.cs
- CompoundFileStorageReference.cs
- XmlTextReaderImpl.cs
- BinaryConverter.cs
- _AuthenticationState.cs
- EditCommandColumn.cs
- AppDomainUnloadedException.cs
- HostingPreferredMapPath.cs
- SqlServer2KCompatibilityAnnotation.cs
- SEHException.cs
- _SafeNetHandles.cs