Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AuthenticationModuleElement.cs
- RadioButtonStandardAdapter.cs
- BaseTemplateBuildProvider.cs
- MultiView.cs
- DrawingCollection.cs
- EncryptedData.cs
- PerformanceCounterNameAttribute.cs
- BinaryFormatterWriter.cs
- FileSecurity.cs
- CompositionAdorner.cs
- WindowHideOrCloseTracker.cs
- IsolatedStorageException.cs
- BinaryObjectReader.cs
- ImageConverter.cs
- _SingleItemRequestCache.cs
- Gdiplus.cs
- IImplicitResourceProvider.cs
- SqlUserDefinedAggregateAttribute.cs
- DbProviderFactories.cs
- AsymmetricAlgorithm.cs
- XPathDocument.cs
- SqlBooleanMismatchVisitor.cs
- ContextStaticAttribute.cs
- TraceContextRecord.cs
- RegexCompilationInfo.cs
- MouseBinding.cs
- MemoryFailPoint.cs
- ResourceProviderFactory.cs
- HostProtectionException.cs
- FormViewRow.cs
- DiagnosticsConfiguration.cs
- FunctionDefinition.cs
- InputMethodStateChangeEventArgs.cs
- RadioButton.cs
- ControlValuePropertyAttribute.cs
- ScriptRegistrationManager.cs
- SqlMethodTransformer.cs
- XmlResolver.cs
- Int32Rect.cs
- BooleanSwitch.cs
- SemanticAnalyzer.cs
- JavaScriptObjectDeserializer.cs
- RepeaterItem.cs
- GridViewCancelEditEventArgs.cs
- WizardPanel.cs
- RequestChannel.cs
- RequiredAttributeAttribute.cs
- ClientOptions.cs
- XmlSchemaAttributeGroupRef.cs
- AddInProcess.cs
- SqlDataSourceStatusEventArgs.cs
- Span.cs
- FunctionDescription.cs
- BinaryMethodMessage.cs
- MenuAdapter.cs
- PathFigureCollection.cs
- Style.cs
- SectionUpdates.cs
- ConstraintStruct.cs
- IgnoreFileBuildProvider.cs
- VirtualPath.cs
- TextLineBreak.cs
- WebPartActionVerb.cs
- Win32NamedPipes.cs
- ArrayWithOffset.cs
- ComponentResourceKeyConverter.cs
- SqlBulkCopyColumnMapping.cs
- SqlMetaData.cs
- NavigateEvent.cs
- CheckBoxBaseAdapter.cs
- TextWriter.cs
- BeginCreateSecurityTokenRequest.cs
- NamedPermissionSet.cs
- ExtensionDataReader.cs
- ContextMenuAutomationPeer.cs
- Enum.cs
- SerializationSectionGroup.cs
- XmlNodeChangedEventArgs.cs
- TypeProvider.cs
- Localizer.cs
- XhtmlBasicValidationSummaryAdapter.cs
- LinkLabelLinkClickedEvent.cs
- RunWorkerCompletedEventArgs.cs
- SeekableReadStream.cs
- AnnotationHighlightLayer.cs
- EmptyControlCollection.cs
- PropertyEntry.cs
- HeaderLabel.cs
- DataGridPagerStyle.cs
- XmlNodeComparer.cs
- COSERVERINFO.cs
- NumericUpDown.cs
- Memoizer.cs
- MailMessageEventArgs.cs
- AddInControllerImpl.cs
- RecipientInfo.cs
- ListViewSortEventArgs.cs
- recordstatefactory.cs
- ColumnTypeConverter.cs
- HandlerFactoryWrapper.cs