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; 
 
    /// 
    ///    Provides a 
    ///       type converter to convert 8-bit unsigned
    ///       integer objects to and from various other representations. 
    ///  
    [HostProtection(SharedState = true)] 
    public class SByteConverter : BaseNumberConverter
    { 
 
        /// 
        /// 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; 
 
    /// 
    ///    Provides a 
    ///       type converter to convert 8-bit unsigned
    ///       integer objects to and from various other representations. 
    ///  
    [HostProtection(SharedState = true)] 
    public class SByteConverter : BaseNumberConverter
    { 
 
        /// 
        /// 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
- RawTextInputReport.cs
- CodeAttributeArgumentCollection.cs
- FormViewAutoFormat.cs
- SessionParameter.cs
- InputReport.cs
- AssemblyInfo.cs
- Point4DConverter.cs
- DynamicRouteExpression.cs
- ApplicationFileParser.cs
- WindowsGraphics.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- SecurityIdentifierElement.cs
- BinaryCommonClasses.cs
- DivideByZeroException.cs
- HtmlDocument.cs
- Activity.cs
- CodeGeneratorAttribute.cs
- XmlQualifiedName.cs
- HtmlTitle.cs
- TextRangeProviderWrapper.cs
- XmlChildNodes.cs
- Comparer.cs
- XmlSiteMapProvider.cs
- XmlDataProvider.cs
- RequestStatusBarUpdateEventArgs.cs
- SystemResourceKey.cs
- RouteUrlExpressionBuilder.cs
- GenericEnumerator.cs
- MaxMessageSizeStream.cs
- DataMemberAttribute.cs
- ArrayList.cs
- ExpressionBuilderCollection.cs
- OutOfProcStateClientManager.cs
- PrinterResolution.cs
- FastEncoderWindow.cs
- Wildcard.cs
- MenuItemCollection.cs
- WindowsScrollBar.cs
- InputDevice.cs
- WebBodyFormatMessageProperty.cs
- NoClickablePointException.cs
- MatrixKeyFrameCollection.cs
- ArgumentOutOfRangeException.cs
- ResourceExpressionBuilder.cs
- SoapObjectReader.cs
- UIPermission.cs
- RoleService.cs
- MdiWindowListItemConverter.cs
- PopupEventArgs.cs
- TranslateTransform3D.cs
- ControlCachePolicy.cs
- WebBrowser.cs
- DefaultWorkflowLoaderService.cs
- EntityClientCacheKey.cs
- PersonalizablePropertyEntry.cs
- ArrayTypeMismatchException.cs
- SoapFault.cs
- List.cs
- Int32Collection.cs
- HttpAsyncResult.cs
- CodeRegionDirective.cs
- TitleStyle.cs
- ListControlConvertEventArgs.cs
- ActivationServices.cs
- PasswordBoxAutomationPeer.cs
- DbParameterCollection.cs
- WindowsServiceElement.cs
- DescendantQuery.cs
- LogicalCallContext.cs
- CapabilitiesUse.cs
- MouseCaptureWithinProperty.cs
- RichTextBoxAutomationPeer.cs
- ConfigXmlText.cs
- StandardCommands.cs
- ConfigXmlComment.cs
- PersonalizationEntry.cs
- XmlJsonReader.cs
- XmlUnspecifiedAttribute.cs
- XmlSchemaExternal.cs
- CheckableControlBaseAdapter.cs
- Point4D.cs
- IntegerCollectionEditor.cs
- DataExpression.cs
- XmlUtil.cs
- DataViewSettingCollection.cs
- ExpandSegment.cs
- SchemaElementLookUpTable.cs
- RegexMatch.cs
- TextWriterEngine.cs
- GregorianCalendar.cs
- OleDbParameter.cs
- XDRSchema.cs
- DoubleStorage.cs
- ClientUtils.cs
- XmlChildEnumerator.cs
- Region.cs
- TcpAppDomainProtocolHandler.cs
- BCLDebug.cs
- QueryContinueDragEvent.cs
- Rotation3D.cs