Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / ByteConverter.cs / 1 / ByteConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using Microsoft.Win32; using System.ComponentModel; 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 ByteConverter : 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(Byte); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToByte(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Byte.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 Byte.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Byte)value).ToString("G", formatInfo); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextBox.cs
- CodeGeneratorAttribute.cs
- WebHttpSecurity.cs
- DeleteBookmarkScope.cs
- EmbeddedMailObjectsCollection.cs
- WindowsSpinner.cs
- TabRenderer.cs
- ComponentChangingEvent.cs
- RawStylusInputReport.cs
- AlignmentXValidation.cs
- UserNameSecurityTokenProvider.cs
- DataGridItem.cs
- DataGridViewAccessibleObject.cs
- ProtectedConfiguration.cs
- httpserverutility.cs
- FixedHyperLink.cs
- CodeArrayIndexerExpression.cs
- LoginDesigner.cs
- DigitShape.cs
- ZoneButton.cs
- Pair.cs
- ValidationPropertyAttribute.cs
- HttpVersion.cs
- URLIdentityPermission.cs
- ContextMenuAutomationPeer.cs
- BamlLocalizableResourceKey.cs
- FrameworkName.cs
- XmlSerializationReader.cs
- DataGridColumnCollectionEditor.cs
- ToolStripDropTargetManager.cs
- SafeNativeMethods.cs
- BaseTreeIterator.cs
- BamlRecordHelper.cs
- XmlILOptimizerVisitor.cs
- IdentityManager.cs
- PartialTrustVisibleAssembliesSection.cs
- ComPlusDiagnosticTraceRecords.cs
- GetPageNumberCompletedEventArgs.cs
- ThreadSafeMessageFilterTable.cs
- BatchWriter.cs
- ContainerUtilities.cs
- EasingKeyFrames.cs
- ComboBox.cs
- BuildProvider.cs
- StrokeNodeEnumerator.cs
- SqlTopReducer.cs
- ValidatedControlConverter.cs
- StateItem.cs
- XmlSiteMapProvider.cs
- TreeNodeBinding.cs
- NetworkInformationPermission.cs
- Size.cs
- WorkflowRuntimeElement.cs
- BaseCollection.cs
- PageHandlerFactory.cs
- CellLabel.cs
- DbMetaDataCollectionNames.cs
- DataKeyPropertyAttribute.cs
- BaseWebProxyFinder.cs
- ScrollBar.cs
- ApplicationServicesHostFactory.cs
- FormView.cs
- RightsManagementPermission.cs
- CodeSnippetExpression.cs
- SplineQuaternionKeyFrame.cs
- NameObjectCollectionBase.cs
- HMACSHA256.cs
- Rect3D.cs
- Thread.cs
- FrameworkObject.cs
- BitmapEffectRenderDataResource.cs
- Touch.cs
- SafeHandle.cs
- JavaScriptString.cs
- ParameterCollection.cs
- Number.cs
- SiteMapNodeItemEventArgs.cs
- ObjectQuery_EntitySqlExtensions.cs
- ConfigurationManagerInternal.cs
- HandlerFactoryCache.cs
- PolyLineSegment.cs
- InternalResources.cs
- WindowsGraphicsCacheManager.cs
- BackgroundWorker.cs
- DataSourceXmlClassAttribute.cs
- FtpCachePolicyElement.cs
- IpcManager.cs
- NameValueConfigurationElement.cs
- SqlRecordBuffer.cs
- DESCryptoServiceProvider.cs
- Message.cs
- ControlCollection.cs
- XPathCompileException.cs
- RawUIStateInputReport.cs
- XPathDocumentNavigator.cs
- WebPartExportVerb.cs
- EditingContext.cs
- CommonDialog.cs
- ListControl.cs
- TableLayoutPanelCellPosition.cs