Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- xsdvalidator.cs
- FunctionImportElement.cs
- ObjectHandle.cs
- TextSelectionHelper.cs
- TableParagraph.cs
- SimpleRecyclingCache.cs
- ReadOnlyDictionary.cs
- SqlDataSourceDesigner.cs
- SamlSerializer.cs
- NavigateEvent.cs
- ResourceReader.cs
- SmiContextFactory.cs
- SaveLedgerEntryRequest.cs
- GridViewHeaderRowPresenter.cs
- NewArrayExpression.cs
- categoryentry.cs
- RequestCachePolicy.cs
- ListViewItem.cs
- HtmlInputSubmit.cs
- PersonalizablePropertyEntry.cs
- DynamicMetaObject.cs
- Process.cs
- GraphicsPathIterator.cs
- SkewTransform.cs
- XPathNodeInfoAtom.cs
- DataGridViewIntLinkedList.cs
- PerfCounters.cs
- DataGridViewButtonColumn.cs
- BinaryParser.cs
- EncryptedPackage.cs
- FontFaceLayoutInfo.cs
- Claim.cs
- ConstraintManager.cs
- NewExpression.cs
- AssemblySettingAttributes.cs
- Win32NamedPipes.cs
- NavigateEvent.cs
- EntityCommandCompilationException.cs
- AspNetCompatibilityRequirementsAttribute.cs
- TextBoxRenderer.cs
- streamingZipPartStream.cs
- AttachInfo.cs
- WebBrowser.cs
- IgnorePropertiesAttribute.cs
- TraceUtility.cs
- SessionStateSection.cs
- FlowLayout.cs
- UiaCoreProviderApi.cs
- SystemIPv4InterfaceProperties.cs
- ItemChangedEventArgs.cs
- NullableConverter.cs
- SupportingTokenSpecification.cs
- CodeExpressionCollection.cs
- SQLDoubleStorage.cs
- Number.cs
- AssignDesigner.xaml.cs
- XhtmlBasicPhoneCallAdapter.cs
- InProcStateClientManager.cs
- ViewCellRelation.cs
- _SslStream.cs
- FilteredDataSetHelper.cs
- DeviceContext.cs
- PermissionToken.cs
- BooleanSwitch.cs
- CodeMethodInvokeExpression.cs
- RepeaterCommandEventArgs.cs
- Bold.cs
- Label.cs
- counter.cs
- ChannelPool.cs
- CompilerHelpers.cs
- TableAutomationPeer.cs
- XmlSchemaElement.cs
- CompressStream.cs
- SoapIncludeAttribute.cs
- DataGridColumnCollection.cs
- XmlWrappingReader.cs
- X509Extension.cs
- PlatformNotSupportedException.cs
- WebConfigurationManager.cs
- WebBrowsableAttribute.cs
- FileDialogCustomPlace.cs
- ECDiffieHellmanCngPublicKey.cs
- Interlocked.cs
- GlobalizationAssembly.cs
- XmlIlGenerator.cs
- VersionedStream.cs
- MsmqInputChannel.cs
- Version.cs
- ContentTextAutomationPeer.cs
- XMLDiffLoader.cs
- StrokeNodeOperations2.cs
- EditorPartChrome.cs
- ToolboxControl.cs
- TypeUtil.cs
- ColorIndependentAnimationStorage.cs
- SequentialOutput.cs
- ForwardPositionQuery.cs
- Rijndael.cs
- NonClientArea.cs