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
- Task.cs
- AuthorizationRule.cs
- OrderingInfo.cs
- sqlcontext.cs
- CodeDomComponentSerializationService.cs
- Collection.cs
- WindowsTokenRoleProvider.cs
- UseAttributeSetsAction.cs
- _ScatterGatherBuffers.cs
- ListViewContainer.cs
- EDesignUtil.cs
- CommandField.cs
- ServiceChannelManager.cs
- AddInToken.cs
- ItemType.cs
- MatchingStyle.cs
- ToolStripMenuItem.cs
- IIS7WorkerRequest.cs
- CreateRefExpr.cs
- SafeLocalMemHandle.cs
- Funcletizer.cs
- OracleMonthSpan.cs
- MeasurementDCInfo.cs
- EncryptedPackageFilter.cs
- GeometryConverter.cs
- CngAlgorithmGroup.cs
- SqlPersonalizationProvider.cs
- NativeMethods.cs
- XmlTextEncoder.cs
- State.cs
- XmlArrayItemAttributes.cs
- InvalidFilterCriteriaException.cs
- SQLResource.cs
- SimpleTextLine.cs
- TableStyle.cs
- JapaneseCalendar.cs
- MethodRental.cs
- ScrollableControl.cs
- PasswordBox.cs
- PrintEvent.cs
- _ShellExpression.cs
- AsmxEndpointPickerExtension.cs
- FlowDocumentPage.cs
- Image.cs
- InstalledFontCollection.cs
- AnimationLayer.cs
- PrinterSettings.cs
- DocumentEventArgs.cs
- TextServicesHost.cs
- RtfToken.cs
- MenuItemStyleCollection.cs
- sitestring.cs
- TypeSystem.cs
- MemberNameValidator.cs
- TypedTableBaseExtensions.cs
- TdsParser.cs
- SQLMembershipProvider.cs
- ProgressBarAutomationPeer.cs
- HtmlLabelAdapter.cs
- RectangleF.cs
- MemoryStream.cs
- MembershipPasswordException.cs
- MeshGeometry3D.cs
- RoleGroupCollection.cs
- ValueUtilsSmi.cs
- CancelEventArgs.cs
- JournalNavigationScope.cs
- ReaderContextStackData.cs
- TdsRecordBufferSetter.cs
- StylusSystemGestureEventArgs.cs
- oledbconnectionstring.cs
- coordinatorfactory.cs
- SqlRecordBuffer.cs
- UiaCoreProviderApi.cs
- ObjectParameterCollection.cs
- TextRangeBase.cs
- FtpRequestCacheValidator.cs
- XmlHelper.cs
- TypeNameConverter.cs
- RectangleF.cs
- RelationshipFixer.cs
- HtmlHead.cs
- MatrixValueSerializer.cs
- ChineseLunisolarCalendar.cs
- EndSelectCardRequest.cs
- _AuthenticationState.cs
- XmlEventCache.cs
- FixedSchema.cs
- CodeAttributeDeclaration.cs
- WebPartCatalogAddVerb.cs
- CodeDomSerializationProvider.cs
- ParameterBuilder.cs
- RuleSettings.cs
- ToolStripGrip.cs
- LocalizableResourceBuilder.cs
- KeyFrames.cs
- BitmapDecoder.cs
- WebEvents.cs
- SizeConverter.cs
- TreeNode.cs