Code:
/ DotNET / DotNET / 8.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
- TripleDES.cs
- CacheOutputQuery.cs
- PackagePartCollection.cs
- QueryNode.cs
- PTManager.cs
- DoubleAnimationUsingPath.cs
- ForeignKeyConstraint.cs
- GuidConverter.cs
- DiscreteKeyFrames.cs
- xsdvalidator.cs
- PreviewPrintController.cs
- SingleStorage.cs
- ValueUtilsSmi.cs
- ValidationSummary.cs
- TargetPerspective.cs
- AttributeCollection.cs
- UserMapPath.cs
- OutKeywords.cs
- LicenseContext.cs
- HandlerBase.cs
- CheckBoxRenderer.cs
- MessageEnumerator.cs
- NumberSubstitution.cs
- WizardStepBase.cs
- TableParaClient.cs
- LineProperties.cs
- IUnknownConstantAttribute.cs
- DetailsViewDeletedEventArgs.cs
- ArrangedElement.cs
- CreateUserWizardStep.cs
- WmpBitmapDecoder.cs
- GatewayDefinition.cs
- DataGridViewRow.cs
- PathGeometry.cs
- ConstructorExpr.cs
- RbTree.cs
- ContainerActivationHelper.cs
- SessionSwitchEventArgs.cs
- FontEmbeddingManager.cs
- DateTimeConverter.cs
- XmlSchemaComplexContentRestriction.cs
- BinaryWriter.cs
- RadioButtonBaseAdapter.cs
- FormsAuthenticationTicket.cs
- PathGeometry.cs
- SiteMapNodeItem.cs
- OdbcHandle.cs
- TableLayoutPanel.cs
- CheckBoxFlatAdapter.cs
- DataControlField.cs
- Pkcs7Recipient.cs
- GridEntryCollection.cs
- MILUtilities.cs
- ServiceElement.cs
- WebBrowser.cs
- DropDownList.cs
- OdbcConnectionStringbuilder.cs
- GroupBoxAutomationPeer.cs
- Geometry3D.cs
- CompositeDuplexBindingElement.cs
- WebPartCancelEventArgs.cs
- XmlDataSourceView.cs
- XPathConvert.cs
- EmbeddedMailObjectsCollection.cs
- DecimalAnimationUsingKeyFrames.cs
- VectorCollection.cs
- oledbmetadatacolumnnames.cs
- StatusBarDrawItemEvent.cs
- indexingfiltermarshaler.cs
- CopyAttributesAction.cs
- BitmapEffectrendercontext.cs
- DataMisalignedException.cs
- Geometry3D.cs
- ReachPrintTicketSerializer.cs
- SizeF.cs
- MediaElementAutomationPeer.cs
- ZipIOExtraFieldZip64Element.cs
- SourceChangedEventArgs.cs
- Image.cs
- COM2TypeInfoProcessor.cs
- UnaryNode.cs
- DesignSurfaceServiceContainer.cs
- TransactionBridgeSection.cs
- DataTableExtensions.cs
- CodeMemberEvent.cs
- AssemblyNameProxy.cs
- Empty.cs
- SqlColumnizer.cs
- ArgumentException.cs
- PropertyMapper.cs
- InlineCategoriesDocument.cs
- DoubleCollectionConverter.cs
- DesignerAdRotatorAdapter.cs
- CollectionChangedEventManager.cs
- ConfigurationElementProperty.cs
- HtmlCalendarAdapter.cs
- DataGridHeaderBorder.cs
- XmlUtil.cs
- DependentList.cs
- Clause.cs