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
- WindowsStatic.cs
- Rfc2898DeriveBytes.cs
- GetIsBrowserClientRequest.cs
- StrokeNodeEnumerator.cs
- SimpleMailWebEventProvider.cs
- MetadataElement.cs
- _RequestCacheProtocol.cs
- HttpStreamMessage.cs
- PageDeviceFont.cs
- SqlUtils.cs
- MouseCaptureWithinProperty.cs
- HttpValueCollection.cs
- TextEndOfLine.cs
- WebPartZoneBase.cs
- SQLInt64.cs
- safelinkcollection.cs
- DocumentProperties.cs
- XPathNodeInfoAtom.cs
- QueryGeneratorBase.cs
- Color.cs
- PreloadHost.cs
- MouseGestureConverter.cs
- MeshGeometry3D.cs
- MessageSecurityException.cs
- HttpCapabilitiesSectionHandler.cs
- DocumentPage.cs
- Html32TextWriter.cs
- DragEvent.cs
- SchemaMapping.cs
- InstallerTypeAttribute.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- printdlgexmarshaler.cs
- TaiwanLunisolarCalendar.cs
- OrderedDictionaryStateHelper.cs
- CharacterBufferReference.cs
- InternalPolicyElement.cs
- XmlCharCheckingWriter.cs
- DWriteFactory.cs
- AsymmetricCryptoHandle.cs
- HttpPostedFile.cs
- DynamicValueConverter.cs
- OdbcConnection.cs
- Roles.cs
- DesignerVerb.cs
- SingleKeyFrameCollection.cs
- TypeElementCollection.cs
- HostingPreferredMapPath.cs
- NamespaceDecl.cs
- ToolStripItemEventArgs.cs
- SafeBitVector32.cs
- SoapDocumentServiceAttribute.cs
- ByteAnimationUsingKeyFrames.cs
- SoapSchemaExporter.cs
- SRGSCompiler.cs
- Package.cs
- ColorContext.cs
- Int64Animation.cs
- XmlSchemaValidator.cs
- OracleConnectionFactory.cs
- SafeNativeMethodsMilCoreApi.cs
- RootBuilder.cs
- ServerValidateEventArgs.cs
- DataMember.cs
- _ShellExpression.cs
- ListBindingConverter.cs
- StringArrayConverter.cs
- SymbolType.cs
- DataBindEngine.cs
- SqlRowUpdatingEvent.cs
- FollowerQueueCreator.cs
- SubpageParaClient.cs
- GridViewSortEventArgs.cs
- HebrewNumber.cs
- ChildTable.cs
- SizeValueSerializer.cs
- Figure.cs
- Visual3D.cs
- FtpWebRequest.cs
- ScrollEventArgs.cs
- UTF8Encoding.cs
- ResourcePart.cs
- ListenerElementsCollection.cs
- CommandID.cs
- DatatypeImplementation.cs
- DbConnectionPool.cs
- SafeLocalMemHandle.cs
- ToolStripItemImageRenderEventArgs.cs
- XLinq.cs
- ErrorEventArgs.cs
- CellIdBoolean.cs
- CopyAction.cs
- PersonalizationAdministration.cs
- FontUnitConverter.cs
- VirtualPathProvider.cs
- mediaeventshelper.cs
- CapabilitiesAssignment.cs
- InnerItemCollectionView.cs
- AsyncOperation.cs
- InputElement.cs
- VectorCollection.cs