Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ComplexPropertyEntry.cs
- OdbcConnectionFactory.cs
- ArraySortHelper.cs
- ExpressionValueEditor.cs
- CustomErrorCollection.cs
- MeshGeometry3D.cs
- SQLBytes.cs
- SmtpMail.cs
- TextContainerChangedEventArgs.cs
- TextEffect.cs
- SupportedAddressingMode.cs
- MLangCodePageEncoding.cs
- DataProtection.cs
- Math.cs
- _ListenerResponseStream.cs
- DateTimeAutomationPeer.cs
- WindowVisualStateTracker.cs
- TypeToken.cs
- BitmapEffect.cs
- GifBitmapEncoder.cs
- GraphicsPath.cs
- MergeFilterQuery.cs
- TemplateNameScope.cs
- ParameterCollectionEditorForm.cs
- SrgsRulesCollection.cs
- EdmItemCollection.cs
- TextElementEditingBehaviorAttribute.cs
- SafeCryptHandles.cs
- newinstructionaction.cs
- HandoffBehavior.cs
- ServiceDocumentFormatter.cs
- NullableConverter.cs
- QilFactory.cs
- CompensatableTransactionScopeActivityDesigner.cs
- Profiler.cs
- PackagingUtilities.cs
- ConsoleCancelEventArgs.cs
- DbProviderManifest.cs
- SamlEvidence.cs
- GenericArgumentsUpdater.cs
- DeriveBytes.cs
- BindingManagerDataErrorEventArgs.cs
- Rectangle.cs
- LookupNode.cs
- ConsoleTraceListener.cs
- AbsoluteQuery.cs
- AsyncStreamReader.cs
- BuildProvidersCompiler.cs
- CrossContextChannel.cs
- StyleCollection.cs
- Opcode.cs
- TextFormattingConverter.cs
- LineInfo.cs
- TypeUtil.cs
- AnchoredBlock.cs
- ToolStripDropDown.cs
- RealProxy.cs
- RegexCapture.cs
- ImageSource.cs
- ClassHandlersStore.cs
- Visual.cs
- LassoHelper.cs
- ExceptionValidationRule.cs
- OracleSqlParser.cs
- BmpBitmapEncoder.cs
- XmlReaderSettings.cs
- EventLogConfiguration.cs
- AuthenticationModuleElementCollection.cs
- Pointer.cs
- TextBoxLine.cs
- IxmlLineInfo.cs
- Calendar.cs
- DispatcherFrame.cs
- SortAction.cs
- MessageQueueConverter.cs
- InputScope.cs
- TextSelectionHelper.cs
- BitConverter.cs
- OciLobLocator.cs
- BinaryObjectInfo.cs
- DependencyObjectPropertyDescriptor.cs
- Rfc2898DeriveBytes.cs
- XmlRootAttribute.cs
- SqlNamer.cs
- CapabilitiesState.cs
- DataListComponentEditor.cs
- AmbiguousMatchException.cs
- ContractMapping.cs
- wgx_sdk_version.cs
- SiteMembershipCondition.cs
- ManipulationVelocities.cs
- DbDeleteCommandTree.cs
- XPathPatternBuilder.cs
- WebPartEditVerb.cs
- XmlRootAttribute.cs
- CellNormalizer.cs
- DataSourceHelper.cs
- BitmapMetadataBlob.cs
- JpegBitmapEncoder.cs
- RuntimeHelpers.cs