Code:
/ FX-1434 / FX-1434 / 1.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
- TypeConverterValueSerializer.cs
- XmlSchemaAnnotation.cs
- ListViewPagedDataSource.cs
- CacheRequest.cs
- ValidatingReaderNodeData.cs
- XmlTypeMapping.cs
- DefaultObjectMappingItemCollection.cs
- RemotingConfiguration.cs
- XmlSchemaComplexContentRestriction.cs
- shaper.cs
- VideoDrawing.cs
- WindowsTreeView.cs
- DataGridCommandEventArgs.cs
- PropertyMap.cs
- CompositionTarget.cs
- DisposableCollectionWrapper.cs
- BasicExpressionVisitor.cs
- LOSFormatter.cs
- XPathMessageFilterTable.cs
- _StreamFramer.cs
- SymbolEqualComparer.cs
- RectAnimation.cs
- HealthMonitoringSection.cs
- ToolStripCustomTypeDescriptor.cs
- ServicesUtilities.cs
- RtfFormatStack.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- CommentGlyph.cs
- COAUTHIDENTITY.cs
- XPathParser.cs
- SqlDataSourceCommandEventArgs.cs
- CollectionViewGroupRoot.cs
- X509Certificate2.cs
- HostAdapter.cs
- DiscoveryDefaults.cs
- Vector3D.cs
- XmlSerializerNamespaces.cs
- ActivityTypeResolver.xaml.cs
- BamlResourceSerializer.cs
- PointConverter.cs
- MimeWriter.cs
- ObjectIDGenerator.cs
- DesignerEditorPartChrome.cs
- TableLayoutColumnStyleCollection.cs
- FunctionCommandText.cs
- QueueNameHelper.cs
- Error.cs
- TargetConverter.cs
- util.cs
- _ConnectOverlappedAsyncResult.cs
- XmlDataSourceNodeDescriptor.cs
- Marshal.cs
- SettingsPropertyCollection.cs
- ACE.cs
- OptimizedTemplateContent.cs
- TimeoutConverter.cs
- PageRouteHandler.cs
- Int16AnimationBase.cs
- TailCallAnalyzer.cs
- Triangle.cs
- ReceiveContent.cs
- MetadataCollection.cs
- CapabilitiesPattern.cs
- MSHTMLHostUtil.cs
- WorkflowTraceTransfer.cs
- ResourceSet.cs
- XmlSchemaComplexContentRestriction.cs
- SessionEndedEventArgs.cs
- SelectionProviderWrapper.cs
- DetailsViewRow.cs
- SelectionItemProviderWrapper.cs
- ObjectAnimationUsingKeyFrames.cs
- OleStrCAMarshaler.cs
- RowUpdatedEventArgs.cs
- CqlLexerHelpers.cs
- FrameworkContentElement.cs
- _NativeSSPI.cs
- CodeNamespaceCollection.cs
- TraceData.cs
- ObfuscateAssemblyAttribute.cs
- ViewStateAttachedPropertyFeature.cs
- BindingExpressionUncommonField.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- ServiceDescription.cs
- EntityDataSourceContextCreatingEventArgs.cs
- XmlNodeReader.cs
- SignatureHelper.cs
- ReferenceConverter.cs
- Timer.cs
- Vars.cs
- HMACSHA512.cs
- PositiveTimeSpanValidatorAttribute.cs
- ComponentCommands.cs
- ICollection.cs
- followingquery.cs
- Stack.cs
- MessageHeaderDescriptionCollection.cs
- ToolStripSeparatorRenderEventArgs.cs
- TraceSwitch.cs
- HwndHostAutomationPeer.cs