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
- BlockCollection.cs
- X509PeerCertificateAuthentication.cs
- PropertyContainer.cs
- VirtualizingPanel.cs
- ActivationServices.cs
- RegexStringValidator.cs
- CodeCatchClauseCollection.cs
- NavigationProperty.cs
- ExpressionDumper.cs
- OdbcError.cs
- PlainXmlWriter.cs
- XPathSelectionIterator.cs
- SmtpDigestAuthenticationModule.cs
- SqlClientPermission.cs
- DoubleConverter.cs
- UpdateExpressionVisitor.cs
- HttpModule.cs
- DesignerAutoFormatStyle.cs
- DelegatingTypeDescriptionProvider.cs
- SimpleWorkerRequest.cs
- RuleSetDialog.Designer.cs
- WebContext.cs
- XmlSignificantWhitespace.cs
- QueryContext.cs
- SystemWebCachingSectionGroup.cs
- TraceXPathNavigator.cs
- DiagnosticsConfigurationHandler.cs
- FontStretchConverter.cs
- DbConnectionPoolOptions.cs
- BinaryParser.cs
- ProfessionalColors.cs
- ProcessHost.cs
- ReaderOutput.cs
- PropertyEmitter.cs
- ObjectPropertyMapping.cs
- AnnotationResourceCollection.cs
- FullTextBreakpoint.cs
- ItemChangedEventArgs.cs
- ListItemParagraph.cs
- FloaterParaClient.cs
- LinkConverter.cs
- DesignerLabelAdapter.cs
- RelatedCurrencyManager.cs
- ScrollEvent.cs
- TemplateFactory.cs
- Group.cs
- XMLDiffLoader.cs
- PreProcessInputEventArgs.cs
- DateTimeParse.cs
- RijndaelManagedTransform.cs
- RightNameExpirationInfoPair.cs
- HttpException.cs
- SqlProcedureAttribute.cs
- Line.cs
- FilterQuery.cs
- NumericUpDownAccelerationCollection.cs
- _ProxyRegBlob.cs
- NotifyParentPropertyAttribute.cs
- AdapterUtil.cs
- TextBox.cs
- WindowsSolidBrush.cs
- ImageListStreamer.cs
- RemotingException.cs
- BackStopAuthenticationModule.cs
- ConnectorDragDropGlyph.cs
- AuthorizationRuleCollection.cs
- XmlHierarchicalDataSourceView.cs
- ListViewGroup.cs
- MappableObjectManager.cs
- SettingsSection.cs
- AbsoluteQuery.cs
- MaterializeFromAtom.cs
- EventToken.cs
- DesignerEditorPartChrome.cs
- StorageEntityContainerMapping.cs
- RC2CryptoServiceProvider.cs
- EntityDataSourceDesignerHelper.cs
- TdsRecordBufferSetter.cs
- SamlAttribute.cs
- ReadWriteControlDesigner.cs
- DbMetaDataColumnNames.cs
- InternalRelationshipCollection.cs
- DbgUtil.cs
- WsdlServiceChannelBuilder.cs
- mediaeventargs.cs
- WebConfigurationHostFileChange.cs
- DataObjectCopyingEventArgs.cs
- COM2IDispatchConverter.cs
- PerformanceCounterPermissionEntry.cs
- SecurityResources.cs
- Container.cs
- WorkItem.cs
- HwndPanningFeedback.cs
- CollectionBuilder.cs
- SQLDoubleStorage.cs
- OdbcEnvironmentHandle.cs
- DateRangeEvent.cs
- SystemNetHelpers.cs
- PropertyPathConverter.cs
- MouseGesture.cs