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
- ToolStripDropDownMenu.cs
- ExpressionNode.cs
- DataObjectMethodAttribute.cs
- ChannelSettingsElement.cs
- ButtonBase.cs
- Table.cs
- ObjectSet.cs
- SecureEnvironment.cs
- DesignerEditorPartChrome.cs
- MultipleViewPatternIdentifiers.cs
- MediaContext.cs
- ReadOnlyAttribute.cs
- StateManagedCollection.cs
- ProtocolsConfigurationHandler.cs
- FillRuleValidation.cs
- WithParamAction.cs
- CustomAttributeFormatException.cs
- XmlSchemaSubstitutionGroup.cs
- TextDecorationCollection.cs
- EntityParameterCollection.cs
- DropDownList.cs
- HintTextConverter.cs
- ArrayConverter.cs
- DbConnectionFactory.cs
- StringKeyFrameCollection.cs
- NonceCache.cs
- Root.cs
- RawMouseInputReport.cs
- ConfigurationElementCollection.cs
- FixedStringLookup.cs
- __Error.cs
- GlyphingCache.cs
- DesignTimeParseData.cs
- ApplicationProxyInternal.cs
- ToolBarButton.cs
- IgnoreFlushAndCloseStream.cs
- EmptyEnumerable.cs
- TextEmbeddedObject.cs
- NativeRightsManagementAPIsStructures.cs
- SqlCacheDependencySection.cs
- DataContractSet.cs
- ProjectionCamera.cs
- RangeExpression.cs
- XPathDescendantIterator.cs
- HwndHostAutomationPeer.cs
- CqlIdentifiers.cs
- AppDomainManager.cs
- OperatingSystem.cs
- TraceListeners.cs
- ProfessionalColors.cs
- ModelPerspective.cs
- Route.cs
- Variable.cs
- EncryptedType.cs
- WorkflowServiceHost.cs
- ReadOnlyKeyedCollection.cs
- EarlyBoundInfo.cs
- Accessible.cs
- XmlEnumAttribute.cs
- EntityContainer.cs
- KeyGestureConverter.cs
- ImportCatalogPart.cs
- ScrollContentPresenter.cs
- TransportOutputChannel.cs
- TemplateBindingExtension.cs
- SmiXetterAccessMap.cs
- RangeValidator.cs
- FormViewDesigner.cs
- DynamicQueryStringParameter.cs
- WinFormsComponentEditor.cs
- FontStretch.cs
- MissingMethodException.cs
- IdentityNotMappedException.cs
- Enlistment.cs
- Sorting.cs
- Viewport3DAutomationPeer.cs
- LinqDataSourceEditData.cs
- CqlWriter.cs
- DataListAutoFormat.cs
- ImageMetadata.cs
- FormattedTextSymbols.cs
- SapiInterop.cs
- ReadOnlyAttribute.cs
- UInt32Converter.cs
- localization.cs
- Table.cs
- ActivityWithResultConverter.cs
- XsltSettings.cs
- SiteMapNodeItem.cs
- ReaderWriterLockWrapper.cs
- Decimal.cs
- XmlQueryCardinality.cs
- OAVariantLib.cs
- XmlDocumentSerializer.cs
- GiveFeedbackEvent.cs
- TargetControlTypeAttribute.cs
- GeneralTransformGroup.cs
- NumericUpDownAccelerationCollection.cs
- ScopelessEnumAttribute.cs
- WebHeaderCollection.cs