Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- BrowserTree.cs
- ConstraintManager.cs
- TTSEngineTypes.cs
- ConfigXmlDocument.cs
- ScriptingWebServicesSectionGroup.cs
- SystemTcpConnection.cs
- ellipse.cs
- TreeNodeClickEventArgs.cs
- DataGridViewDataConnection.cs
- ContentFileHelper.cs
- BulletChrome.cs
- SqlCommandBuilder.cs
- BitVec.cs
- PreviewPageInfo.cs
- PersistenceProvider.cs
- PackWebRequestFactory.cs
- XpsStructure.cs
- XPathBuilder.cs
- StorageTypeMapping.cs
- DictionaryEntry.cs
- HtmlMeta.cs
- AddInContractAttribute.cs
- Package.cs
- CompilerScopeManager.cs
- ZipIOExtraFieldPaddingElement.cs
- __Error.cs
- EmulateRecognizeCompletedEventArgs.cs
- ThreadExceptionEvent.cs
- XmlSerializationReader.cs
- BufferCache.cs
- PlainXmlSerializer.cs
- SettingsBase.cs
- DrawingGroup.cs
- IssuanceLicense.cs
- PolyLineSegment.cs
- GridViewCellAutomationPeer.cs
- IsolatedStorageFileStream.cs
- Select.cs
- CustomAssemblyResolver.cs
- FileResponseElement.cs
- PocoPropertyAccessorStrategy.cs
- InputMethod.cs
- XmlStrings.cs
- _AutoWebProxyScriptEngine.cs
- MediaEntryAttribute.cs
- WeakReadOnlyCollection.cs
- ErrorFormatter.cs
- TextServicesDisplayAttribute.cs
- SQLMoneyStorage.cs
- KeyValueConfigurationElement.cs
- XmlNodeComparer.cs
- OrderablePartitioner.cs
- UserPersonalizationStateInfo.cs
- XPathBinder.cs
- UnconditionalPolicy.cs
- GatewayIPAddressInformationCollection.cs
- GeneralTransform3DCollection.cs
- HtmlControlPersistable.cs
- TemplateInstanceAttribute.cs
- WebPartManager.cs
- TextRangeProviderWrapper.cs
- DSGeneratorProblem.cs
- Repeater.cs
- FontNamesConverter.cs
- SvcMapFileLoader.cs
- Message.cs
- TargetConverter.cs
- DataObjectPastingEventArgs.cs
- CategoryList.cs
- ExtendedProtectionPolicy.cs
- translator.cs
- ConfigurationException.cs
- DelegatingConfigHost.cs
- AvtEvent.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- TextFormatterImp.cs
- MsmqIntegrationProcessProtocolHandler.cs
- PrimaryKeyTypeConverter.cs
- XmlSchemaDatatype.cs
- HtmlFormParameterWriter.cs
- BinaryCommonClasses.cs
- precedingquery.cs
- Binding.cs
- EmptyControlCollection.cs
- XmlILStorageConverter.cs
- WindowsTooltip.cs
- MarkupObject.cs
- FormViewInsertEventArgs.cs
- WebResourceAttribute.cs
- TypeDependencyAttribute.cs
- HtmlElementErrorEventArgs.cs
- SizeF.cs
- PageThemeCodeDomTreeGenerator.cs
- ToolStripItemClickedEventArgs.cs
- XmlValueConverter.cs
- PageOutputQuality.cs
- GeometryModel3D.cs
- DataColumnMappingCollection.cs
- XmlComment.cs
- DbgCompiler.cs