Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ByteConverter.cs / 1305376 / 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); } } } // 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
- FileUpload.cs
- ModifiableIteratorCollection.cs
- HttpException.cs
- EntityProviderServices.cs
- SoapExtensionTypeElementCollection.cs
- DataGridClipboardHelper.cs
- DesignerView.cs
- BindableAttribute.cs
- TextBoxView.cs
- InvalidFilterCriteriaException.cs
- DataGridSortingEventArgs.cs
- QilName.cs
- QilChoice.cs
- PropertyChangeTracker.cs
- ColorAnimationUsingKeyFrames.cs
- SocketConnection.cs
- XmlAggregates.cs
- ListViewInsertEventArgs.cs
- GridViewColumnCollectionChangedEventArgs.cs
- WebPartsSection.cs
- EditingScopeUndoUnit.cs
- Win32MouseDevice.cs
- DataControlHelper.cs
- UpdateRecord.cs
- SqlProviderManifest.cs
- WindowsGrip.cs
- wgx_commands.cs
- TransactionFlowBindingElement.cs
- DrawingContext.cs
- TraceUtility.cs
- ObjectDataSourceStatusEventArgs.cs
- Vector3DAnimationUsingKeyFrames.cs
- DefaultProxySection.cs
- DbException.cs
- HMACSHA1.cs
- PrintingPermissionAttribute.cs
- RenderingBiasValidation.cs
- HyperlinkAutomationPeer.cs
- EventMap.cs
- MobileListItemCollection.cs
- ControlBuilderAttribute.cs
- SqlDependencyUtils.cs
- WindowsProgressbar.cs
- SecurityElementBase.cs
- RSAPKCS1KeyExchangeFormatter.cs
- PerformanceCounterManager.cs
- LockRecursionException.cs
- FilterException.cs
- AnnotationService.cs
- SizeConverter.cs
- DebugInfo.cs
- AuthenticationModuleElement.cs
- CodeAttributeArgument.cs
- PropertyPath.cs
- Win32Exception.cs
- PermissionListSet.cs
- XmlAtomicValue.cs
- MeasureData.cs
- ContentPlaceHolder.cs
- EditingCoordinator.cs
- OperandQuery.cs
- DesignerMetadata.cs
- JobCollate.cs
- shaper.cs
- IRCollection.cs
- SupportsEventValidationAttribute.cs
- ForceCopyBuildProvider.cs
- QueryRewriter.cs
- TemplateControlCodeDomTreeGenerator.cs
- StringKeyFrameCollection.cs
- WindowsFormsHelpers.cs
- XpsSerializationException.cs
- HotSpotCollection.cs
- NavigationProgressEventArgs.cs
- ReachFixedPageSerializer.cs
- ProviderCollection.cs
- ConvertEvent.cs
- UnsafeCollabNativeMethods.cs
- SecurityPermission.cs
- SeparatorAutomationPeer.cs
- DecimalFormatter.cs
- InputLangChangeRequestEvent.cs
- FillBehavior.cs
- NonClientArea.cs
- HtmlInputImage.cs
- SafeLocalMemHandle.cs
- ResourceContainer.cs
- MappingException.cs
- ObjectMemberMapping.cs
- TableRow.cs
- RuntimeHandles.cs
- DataFormats.cs
- TextTreeTextElementNode.cs
- XmlExtensionFunction.cs
- ResourceAttributes.cs
- ProtocolReflector.cs
- RightsManagementPermission.cs
- StorageConditionPropertyMapping.cs
- SimpleWebHandlerParser.cs
- BuildProviderAppliesToAttribute.cs