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
- PhysicalFontFamily.cs
- DateTimeValueSerializerContext.cs
- ImageEditor.cs
- XmlHelper.cs
- FormsAuthentication.cs
- LocalizableResourceBuilder.cs
- EndPoint.cs
- FocusManager.cs
- SchemaImporterExtensionsSection.cs
- WebContext.cs
- InkPresenter.cs
- ColorMap.cs
- DataSetMappper.cs
- EventSetter.cs
- SrgsElementFactoryCompiler.cs
- _Events.cs
- DetailsViewInsertEventArgs.cs
- EventLevel.cs
- TextRenderer.cs
- WindowsFont.cs
- CompilerTypeWithParams.cs
- DocComment.cs
- ApplicationServiceHelper.cs
- FixedFindEngine.cs
- DBNull.cs
- DbProviderFactoriesConfigurationHandler.cs
- TextParagraphProperties.cs
- Wizard.cs
- DemultiplexingClientMessageFormatter.cs
- CodeNamespaceImportCollection.cs
- ComEventsInfo.cs
- SystemIPAddressInformation.cs
- ComboBox.cs
- XPathNodeList.cs
- TraceContext.cs
- TableLayoutRowStyleCollection.cs
- DataFieldEditor.cs
- Stackframe.cs
- Span.cs
- UrlMappingsSection.cs
- _NegoState.cs
- LightweightCodeGenerator.cs
- XsdBuildProvider.cs
- ProfileSection.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- ObjectSet.cs
- XmlObjectSerializer.cs
- GenericEnumConverter.cs
- SQLResource.cs
- PointAnimationBase.cs
- Expressions.cs
- SafeEventHandle.cs
- OdbcCommand.cs
- RSAPKCS1SignatureDeformatter.cs
- ComponentEditorPage.cs
- WizardStepBase.cs
- HandlerBase.cs
- BypassElement.cs
- SiteMapNodeItem.cs
- SendMailErrorEventArgs.cs
- DataGrid.cs
- _KerberosClient.cs
- FontStretches.cs
- TextTreeNode.cs
- HyperLink.cs
- DictionaryKeyPropertyAttribute.cs
- RuleSettings.cs
- PointCollection.cs
- AQNBuilder.cs
- Item.cs
- KeyboardDevice.cs
- OleDbStruct.cs
- UnsafeNativeMethods.cs
- EntityWrapperFactory.cs
- TextDecoration.cs
- AdRotator.cs
- SqlExpander.cs
- Context.cs
- ProfileService.cs
- GridViewDeleteEventArgs.cs
- ContentHostHelper.cs
- DbMetaDataCollectionNames.cs
- RewritingValidator.cs
- PackagePart.cs
- HtmlElementCollection.cs
- StringAnimationUsingKeyFrames.cs
- ScriptMethodAttribute.cs
- ToolStrip.cs
- XmlSchemaNotation.cs
- NavigationCommands.cs
- ConstNode.cs
- ParserHooks.cs
- DefaultHttpHandler.cs
- Material.cs
- SymbolEqualComparer.cs
- ConfigurationPermission.cs
- RectangleHotSpot.cs
- ConfigurationException.cs
- ColorPalette.cs
- ServerValidateEventArgs.cs