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
- BitmapMetadataEnumerator.cs
- TreeNodeConverter.cs
- TripleDESCryptoServiceProvider.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- TrackingConditionCollection.cs
- PasswordRecoveryAutoFormat.cs
- LocatorManager.cs
- CachedPathData.cs
- SocketPermission.cs
- SoapSchemaExporter.cs
- ClientScriptManager.cs
- AffineTransform3D.cs
- AttachInfo.cs
- ViewEventArgs.cs
- GenericWebPart.cs
- ActiveXSite.cs
- GridViewCommandEventArgs.cs
- FactoryId.cs
- HttpWriter.cs
- HttpRuntime.cs
- FileDialogCustomPlace.cs
- ExpressionVisitor.cs
- MessageDecoder.cs
- GridViewDeleteEventArgs.cs
- SimpleApplicationHost.cs
- XmlSchemaIdentityConstraint.cs
- NamespaceQuery.cs
- TaiwanLunisolarCalendar.cs
- TabletDevice.cs
- TouchesOverProperty.cs
- cryptoapiTransform.cs
- ValidatingReaderNodeData.cs
- unitconverter.cs
- CheckedListBox.cs
- RootProfilePropertySettingsCollection.cs
- XmlHelper.cs
- StatusBarItem.cs
- ExtensionElementCollection.cs
- SerializableAttribute.cs
- HttpServerProtocol.cs
- HtmlTextArea.cs
- TextParentUndoUnit.cs
- AddressingProperty.cs
- Endpoint.cs
- SQlBooleanStorage.cs
- ToolStripDropDown.cs
- DataServiceQueryProvider.cs
- ApplicationDirectory.cs
- IsolatedStorageFilePermission.cs
- EdgeProfileValidation.cs
- UnsafeNativeMethods.cs
- Stackframe.cs
- FigureParaClient.cs
- WriterOutput.cs
- UriExt.cs
- EDesignUtil.cs
- Composition.cs
- Identity.cs
- keycontainerpermission.cs
- PasswordTextContainer.cs
- DefaultWorkflowLoaderService.cs
- EmptyStringExpandableObjectConverter.cs
- DrawingGroup.cs
- ComponentChangingEvent.cs
- TemplateBaseAction.cs
- InternalsVisibleToAttribute.cs
- ContentFilePart.cs
- XpsS0ValidatingLoader.cs
- DbConnectionPoolGroupProviderInfo.cs
- WebPartConnectionsCancelEventArgs.cs
- ChildTable.cs
- SqlDataSourceCache.cs
- TreeNodeCollection.cs
- Opcode.cs
- XmlHierarchicalDataSourceView.cs
- TextReader.cs
- Int16.cs
- SmtpNegotiateAuthenticationModule.cs
- StateDesigner.Layouts.cs
- TailCallAnalyzer.cs
- DataGridTextBox.cs
- CompilerState.cs
- DataControlFieldCell.cs
- XmlStreamStore.cs
- RightsManagementPermission.cs
- PrintPreviewGraphics.cs
- ClientOptions.cs
- CacheChildrenQuery.cs
- EncryptedKeyIdentifierClause.cs
- UserControl.cs
- BaseTemplateCodeDomTreeGenerator.cs
- UInt64.cs
- ObjectStateFormatter.cs
- WindowsToolbarItemAsMenuItem.cs
- IpcChannelHelper.cs
- GeometryValueSerializer.cs
- PerformanceCounterManager.cs
- ComponentChangingEvent.cs
- TranslateTransform.cs
- HotSpotCollection.cs