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
- SupportsEventValidationAttribute.cs
- EraserBehavior.cs
- JsonClassDataContract.cs
- DateTimeConstantAttribute.cs
- DataGridPagerStyle.cs
- FloaterBaseParagraph.cs
- UnsafeNativeMethodsMilCoreApi.cs
- XhtmlConformanceSection.cs
- FacetChecker.cs
- WorkflowElementDialog.cs
- EntityConnection.cs
- CultureMapper.cs
- PageAdapter.cs
- TailCallAnalyzer.cs
- PipeStream.cs
- SQLMembershipProvider.cs
- EventLogPermissionAttribute.cs
- FormsIdentity.cs
- AttributeUsageAttribute.cs
- HttpCapabilitiesEvaluator.cs
- FormViewDesigner.cs
- DataControlReferenceCollection.cs
- WebPartPersonalization.cs
- TabControlAutomationPeer.cs
- TriggerActionCollection.cs
- RemoveStoryboard.cs
- PassportAuthenticationEventArgs.cs
- Rotation3D.cs
- MetadataFile.cs
- CommonXSendMessage.cs
- RelativeSource.cs
- HWStack.cs
- PerspectiveCamera.cs
- CalendarTable.cs
- SafeCryptContextHandle.cs
- GeometryHitTestResult.cs
- HitTestDrawingContextWalker.cs
- EntityViewGenerationAttribute.cs
- odbcmetadatacolumnnames.cs
- Assign.cs
- CheckoutException.cs
- ConnectionPointCookie.cs
- DrawingBrush.cs
- StrokeSerializer.cs
- UdpDiscoveryEndpoint.cs
- ITreeGenerator.cs
- ObjRef.cs
- PolicyStatement.cs
- UpDownBase.cs
- AuthStoreRoleProvider.cs
- PreservationFileWriter.cs
- BamlMapTable.cs
- ContextStaticAttribute.cs
- EncodingTable.cs
- BaseResourcesBuildProvider.cs
- Transform3DCollection.cs
- IPAddress.cs
- TableItemStyle.cs
- XmlReader.cs
- SqlFacetAttribute.cs
- SqlDataSourceCache.cs
- WebPartActionVerb.cs
- Parameter.cs
- BuildDependencySet.cs
- MethodBuilderInstantiation.cs
- DataException.cs
- ProvidersHelper.cs
- _ConnectStream.cs
- PixelFormats.cs
- DbConnectionStringCommon.cs
- HyperLinkField.cs
- DependencyPropertyDescriptor.cs
- formatter.cs
- ListViewGroup.cs
- WebPartDeleteVerb.cs
- TableLayoutPanelDesigner.cs
- Point3DCollection.cs
- SqlClientWrapperSmiStream.cs
- SessionState.cs
- PerformanceCountersElement.cs
- WindowsFormsHostAutomationPeer.cs
- PersonalizationDictionary.cs
- Triangle.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- SchemaImporterExtensionsSection.cs
- PngBitmapEncoder.cs
- ConfigurationManagerHelper.cs
- EncoderNLS.cs
- UInt32Converter.cs
- DbBuffer.cs
- GridViewRowEventArgs.cs
- Cursors.cs
- DLinqTableProvider.cs
- MergeFilterQuery.cs
- WorkItem.cs
- assertwrapper.cs
- ContextQuery.cs
- WebEventCodes.cs
- ControlFilterExpression.cs
- XmlAtomicValue.cs