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
- CodeSubDirectoriesCollection.cs
- CacheForPrimitiveTypes.cs
- CodeDefaultValueExpression.cs
- LinqDataSource.cs
- HuffModule.cs
- CompositeActivityValidator.cs
- AmbientProperties.cs
- SafeFileMapViewHandle.cs
- StatusBarItem.cs
- RangeContentEnumerator.cs
- Matrix.cs
- SchemaContext.cs
- ThemeableAttribute.cs
- ScrollChrome.cs
- EnumDataContract.cs
- VerificationAttribute.cs
- WebPartsPersonalization.cs
- _ListenerRequestStream.cs
- ContextMarshalException.cs
- XNameTypeConverter.cs
- ConfigurationElement.cs
- HttpSessionStateWrapper.cs
- StorageAssociationTypeMapping.cs
- Mutex.cs
- MimeBasePart.cs
- DataGridViewColumn.cs
- TableProviderWrapper.cs
- ClientCultureInfo.cs
- OracleCommand.cs
- NamedPipeTransportElement.cs
- OLEDB_Util.cs
- X509RecipientCertificateServiceElement.cs
- JsonQNameDataContract.cs
- _NegoStream.cs
- GlobalizationAssembly.cs
- StrokeDescriptor.cs
- GeneratedContractType.cs
- SamlSecurityTokenAuthenticator.cs
- MonitoringDescriptionAttribute.cs
- UInt64.cs
- CompModSwitches.cs
- SecurityContext.cs
- XsltArgumentList.cs
- OrderedEnumerableRowCollection.cs
- DependencyObject.cs
- WorkflowApplicationTerminatedException.cs
- ListViewSortEventArgs.cs
- Debugger.cs
- HttpApplication.cs
- AuthStoreRoleProvider.cs
- WebBrowserNavigatedEventHandler.cs
- ToolBar.cs
- ExpressionPrinter.cs
- FragmentNavigationEventArgs.cs
- SymbolType.cs
- PagesChangedEventArgs.cs
- XmlSchemaIdentityConstraint.cs
- ExtentCqlBlock.cs
- DecimalFormatter.cs
- DefaultClaimSet.cs
- EnumConverter.cs
- TimeSpanValidatorAttribute.cs
- FormsAuthenticationConfiguration.cs
- InputLanguageEventArgs.cs
- WmlPageAdapter.cs
- HttpContextBase.cs
- JoinCqlBlock.cs
- DLinqAssociationProvider.cs
- ParserContext.cs
- ToolboxItemAttribute.cs
- ConsoleCancelEventArgs.cs
- CodeTypeConstructor.cs
- FolderBrowserDialogDesigner.cs
- PointLightBase.cs
- DataGridViewColumnCollection.cs
- SafeSecurityHelper.cs
- CodeDirectoryCompiler.cs
- TypedTableBaseExtensions.cs
- StateInitialization.cs
- VisualTransition.cs
- DrawingContextWalker.cs
- ModuleElement.cs
- DesignSurfaceManager.cs
- DockingAttribute.cs
- JsonByteArrayDataContract.cs
- Size.cs
- PageCatalogPart.cs
- SimpleApplicationHost.cs
- MouseOverProperty.cs
- BaseValidatorDesigner.cs
- SessionPageStateSection.cs
- MimeTypeAttribute.cs
- DataGridViewLinkCell.cs
- StringUtil.cs
- DataControlFieldCollection.cs
- LocalizedNameDescriptionPair.cs
- SkinBuilder.cs
- MaskDescriptors.cs
- ObjectKeyFrameCollection.cs
- Pair.cs