Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / SByteConverter.cs / 1305376 / 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
- SafeUserTokenHandle.cs
- CheckBoxList.cs
- WebPartDisplayModeEventArgs.cs
- XsltQilFactory.cs
- DataServiceStreamResponse.cs
- RawStylusInputCustomDataList.cs
- WebPartDisplayMode.cs
- RayMeshGeometry3DHitTestResult.cs
- OperationInfo.cs
- FileSystemEnumerable.cs
- GridSplitter.cs
- CaseInsensitiveComparer.cs
- XappLauncher.cs
- AssemblyUtil.cs
- SurrogateSelector.cs
- MultiAsyncResult.cs
- ErrorTableItemStyle.cs
- MultipleViewProviderWrapper.cs
- FlowDocumentReader.cs
- ProxyAttribute.cs
- DetailsViewInsertEventArgs.cs
- TraceContextEventArgs.cs
- ExcludeFromCodeCoverageAttribute.cs
- MarshalByValueComponent.cs
- ProfileSection.cs
- ConditionChanges.cs
- QilTypeChecker.cs
- MulticastOption.cs
- DetailsViewDeleteEventArgs.cs
- Light.cs
- EntitySetRetriever.cs
- ControlAdapter.cs
- PostBackOptions.cs
- SQLConvert.cs
- panel.cs
- hresults.cs
- TextDecorations.cs
- DataFormats.cs
- TypeInitializationException.cs
- Point.cs
- StorageRoot.cs
- ValidationErrorEventArgs.cs
- ListControlDesigner.cs
- ToolStripLocationCancelEventArgs.cs
- DateRangeEvent.cs
- EndCreateSecurityTokenRequest.cs
- ComplexBindingPropertiesAttribute.cs
- ExecutionEngineException.cs
- externdll.cs
- CustomAssemblyResolver.cs
- FormatException.cs
- PlacementWorkspace.cs
- NavigationPropertyEmitter.cs
- ListViewInsertionMark.cs
- TableColumn.cs
- HttpHandlersSection.cs
- SiteMapProvider.cs
- SqlConnection.cs
- DocumentOrderQuery.cs
- SafePEFileHandle.cs
- MenuBase.cs
- HtmlInputImage.cs
- WorkflowInstance.cs
- returneventsaver.cs
- _emptywebproxy.cs
- ValueUnavailableException.cs
- MeasureData.cs
- StylusPointPropertyInfoDefaults.cs
- _SpnDictionary.cs
- lengthconverter.cs
- COAUTHINFO.cs
- FontStyle.cs
- XmlTextEncoder.cs
- ObservableDictionary.cs
- SkinBuilder.cs
- _ConnectOverlappedAsyncResult.cs
- TableLayoutPanelBehavior.cs
- SessionEndedEventArgs.cs
- LayoutEditorPart.cs
- PageWrapper.cs
- Int16AnimationUsingKeyFrames.cs
- XmlDictionaryString.cs
- ManagementOperationWatcher.cs
- ExtentKey.cs
- AssociationEndMember.cs
- SqlParameterizer.cs
- Path.cs
- PerspectiveCamera.cs
- LoginDesigner.cs
- SchemaImporterExtensionElement.cs
- DispatchWrapper.cs
- TrimSurroundingWhitespaceAttribute.cs
- ZoneLinkButton.cs
- MetaType.cs
- TreeNodeClickEventArgs.cs
- SupportingTokenSpecification.cs
- SiteOfOriginPart.cs
- Parameter.cs
- DTCTransactionManager.cs
- ObjectStateEntryDbUpdatableDataRecord.cs