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
- WizardPanel.cs
- NullableBoolConverter.cs
- Point3D.cs
- GridViewCommandEventArgs.cs
- WebZone.cs
- DataGridViewComboBoxCell.cs
- GrammarBuilderPhrase.cs
- XComponentModel.cs
- NotifyIcon.cs
- Vector3dCollection.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- JournalNavigationScope.cs
- XmlDocumentFragment.cs
- HWStack.cs
- DodSequenceMerge.cs
- DataBoundControlDesigner.cs
- ContextMenuStripGroup.cs
- RtfToXamlLexer.cs
- TargetInvocationException.cs
- DataSourceBooleanViewSchemaConverter.cs
- XmlHelper.cs
- XpsSerializerFactory.cs
- XmlParserContext.cs
- SerialPort.cs
- StrongNameUtility.cs
- RijndaelManagedTransform.cs
- ListItemCollection.cs
- EmissiveMaterial.cs
- GeneralTransform3D.cs
- _UriTypeConverter.cs
- StorageConditionPropertyMapping.cs
- AuthenticationConfig.cs
- HttpHandlerActionCollection.cs
- PerformanceCounterPermissionAttribute.cs
- BaseTemplateParser.cs
- EncryptedKey.cs
- TextSelectionProcessor.cs
- RestHandler.cs
- RectAnimation.cs
- DataGridComponentEditor.cs
- SmiXetterAccessMap.cs
- MemberMaps.cs
- TextBoxBaseDesigner.cs
- DataViewManagerListItemTypeDescriptor.cs
- AppSettingsExpressionBuilder.cs
- MimePart.cs
- PrintPageEvent.cs
- LingerOption.cs
- TypeUsageBuilder.cs
- Parallel.cs
- StylusDownEventArgs.cs
- WindowsFormsHostPropertyMap.cs
- RectKeyFrameCollection.cs
- FlowDocumentPaginator.cs
- CancelEventArgs.cs
- MonikerBuilder.cs
- CommentEmitter.cs
- MD5.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- UrlMappingsSection.cs
- DefaultExpression.cs
- EntityTemplateFactory.cs
- XmlSchema.cs
- FunctionParameter.cs
- ObjectDisposedException.cs
- Cursors.cs
- XmlDataSourceNodeDescriptor.cs
- EventLogEntryCollection.cs
- Point3D.cs
- Freezable.cs
- SemanticResolver.cs
- TcpAppDomainProtocolHandler.cs
- SkipStoryboardToFill.cs
- SimpleWorkerRequest.cs
- SerializationSectionGroup.cs
- CodeTypeConstructor.cs
- TimeSpanValidatorAttribute.cs
- MsmqIntegrationProcessProtocolHandler.cs
- WebControl.cs
- RootBuilder.cs
- ApplicationFileParser.cs
- DataListItem.cs
- XmlDomTextWriter.cs
- ApplicationActivator.cs
- AsyncStreamReader.cs
- DesignerDataRelationship.cs
- DataColumnMapping.cs
- DesignTableCollection.cs
- Hex.cs
- ScrollableControl.cs
- Comparer.cs
- FolderLevelBuildProviderCollection.cs
- Expression.cs
- Span.cs
- RepeaterCommandEventArgs.cs
- EdmItemCollection.cs
- WindowsGraphics.cs
- CommandSet.cs
- SecurityDocument.cs
- IdnElement.cs