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
- ExtenderControl.cs
- QilNode.cs
- OptimizedTemplateContentHelper.cs
- ArrayItemValue.cs
- ComponentResourceManager.cs
- WebRequestModulesSection.cs
- Utils.cs
- Bookmark.cs
- ComPlusTraceRecord.cs
- Cursor.cs
- HiddenFieldPageStatePersister.cs
- RowType.cs
- DispatchWrapper.cs
- QEncodedStream.cs
- SourceElementsCollection.cs
- PseudoWebRequest.cs
- Page.cs
- UnmanagedMemoryStream.cs
- KnownTypes.cs
- BrowserCapabilitiesFactoryBase.cs
- VoiceObjectToken.cs
- WebBrowserProgressChangedEventHandler.cs
- SecurityImpersonationBehavior.cs
- MdiWindowListItemConverter.cs
- GridSplitter.cs
- Point3D.cs
- ListViewUpdateEventArgs.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- WebPartVerbCollection.cs
- ServiceOperation.cs
- TreeNodeClickEventArgs.cs
- ServicePointManagerElement.cs
- PassportAuthentication.cs
- Point3DConverter.cs
- MetabaseSettingsIis7.cs
- MsmqTransportReceiveParameters.cs
- KeyManager.cs
- SubMenuStyleCollection.cs
- UnmanagedBitmapWrapper.cs
- StorageMappingItemLoader.cs
- WebServiceHostFactory.cs
- RequestChannel.cs
- XmlAtomicValue.cs
- HMACSHA1.cs
- OdbcConnection.cs
- TailCallAnalyzer.cs
- WmlPageAdapter.cs
- dtdvalidator.cs
- XmlSecureResolver.cs
- LocatorManager.cs
- SafeArrayTypeMismatchException.cs
- ShaderEffect.cs
- ColumnWidthChangedEvent.cs
- MouseEventArgs.cs
- TransactionManager.cs
- RegexStringValidator.cs
- RelationshipConverter.cs
- ProviderSettings.cs
- ComPersistableTypeElement.cs
- OdbcConnectionFactory.cs
- ThreadStartException.cs
- XmlBindingWorker.cs
- StyleCollection.cs
- SigningDialog.cs
- FrameworkElementFactoryMarkupObject.cs
- XmlCharCheckingReader.cs
- XPathNavigatorKeyComparer.cs
- PrintController.cs
- Version.cs
- __FastResourceComparer.cs
- RtfFormatStack.cs
- MailMessageEventArgs.cs
- HttpPostedFile.cs
- CapabilitiesSection.cs
- PreservationFileReader.cs
- BrowserCapabilitiesCodeGenerator.cs
- RtfToken.cs
- Effect.cs
- HandleRef.cs
- WorkflowExecutor.cs
- SafeThemeHandle.cs
- Error.cs
- InputEventArgs.cs
- DbSetClause.cs
- Style.cs
- ControlParameter.cs
- SettingsPropertyValue.cs
- XmlSignificantWhitespace.cs
- PartialTrustVisibleAssemblyCollection.cs
- FontFamilyIdentifier.cs
- TextInfo.cs
- ListViewPagedDataSource.cs
- XmlBinaryReader.cs
- Win32Exception.cs
- ResourceWriter.cs
- TreeWalker.cs
- EqualityComparer.cs
- DataBindingExpressionBuilder.cs
- TextSelection.cs
- DataGridViewRowPrePaintEventArgs.cs