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
- PointIndependentAnimationStorage.cs
- DataRowView.cs
- DateTimeParse.cs
- loginstatus.cs
- NativeRightsManagementAPIsStructures.cs
- CharEntityEncoderFallback.cs
- GlyphsSerializer.cs
- PinnedBufferMemoryStream.cs
- Timer.cs
- DiscoveryReferences.cs
- MappingItemCollection.cs
- ErrorTableItemStyle.cs
- Misc.cs
- DataExpression.cs
- LocationSectionRecord.cs
- EnumConverter.cs
- PolicyManager.cs
- WindowsIPAddress.cs
- ConfigXmlDocument.cs
- PublisherIdentityPermission.cs
- mediapermission.cs
- Decimal.cs
- EntityDataSourceStatementEditor.cs
- ProcessHostServerConfig.cs
- ControlBindingsConverter.cs
- QueryCacheManager.cs
- XPathArrayIterator.cs
- ProviderConnectionPoint.cs
- MenuItem.cs
- ColumnClickEvent.cs
- URL.cs
- ProgressBarHighlightConverter.cs
- HexParser.cs
- NavigationWindow.cs
- ImageButton.cs
- HtmlInputCheckBox.cs
- DataGridTable.cs
- securitycriticaldataClass.cs
- ApplicationSettingsBase.cs
- ComponentDispatcherThread.cs
- Bitmap.cs
- RouteData.cs
- NotFiniteNumberException.cs
- DoubleAnimationUsingPath.cs
- EdmSchemaAttribute.cs
- SafeNativeMethods.cs
- IDReferencePropertyAttribute.cs
- LogicalChannel.cs
- ProcessThread.cs
- TextAutomationPeer.cs
- WindowInteractionStateTracker.cs
- HMACSHA512.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- XmlAtomicValue.cs
- DesignerAdapterUtil.cs
- PointLightBase.cs
- ColumnClickEvent.cs
- UnmanagedBitmapWrapper.cs
- BookmarkTable.cs
- RangeValidator.cs
- Image.cs
- DBDataPermission.cs
- SqlCaseSimplifier.cs
- SoundPlayerAction.cs
- Stack.cs
- XamlVector3DCollectionSerializer.cs
- FocusWithinProperty.cs
- ContextMenu.cs
- MLangCodePageEncoding.cs
- ServicePoint.cs
- GridToolTip.cs
- BookmarkTable.cs
- VisualTreeHelper.cs
- DataSourceDescriptorCollection.cs
- DataControlImageButton.cs
- XmlUnspecifiedAttribute.cs
- ProxyWebPart.cs
- ScalarConstant.cs
- regiisutil.cs
- DataGridHeaderBorder.cs
- CompressionTracing.cs
- OleDbConnectionInternal.cs
- EncoderBestFitFallback.cs
- PhonemeEventArgs.cs
- QilXmlReader.cs
- FigureHelper.cs
- BrowserTree.cs
- SqlDataSourceStatusEventArgs.cs
- ArrayItemValue.cs
- SqlClientWrapperSmiStreamChars.cs
- HwndStylusInputProvider.cs
- FormatterConverter.cs
- ParserStreamGeometryContext.cs
- Dump.cs
- InputLanguageManager.cs
- CompositeTypefaceMetrics.cs
- XsdBuildProvider.cs
- PriorityBinding.cs
- RegexTypeEditor.cs
- WindowsMenu.cs