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
- OperationBehaviorAttribute.cs
- OrthographicCamera.cs
- ComboBoxAutomationPeer.cs
- Action.cs
- URI.cs
- BoolExpr.cs
- AttributeCollection.cs
- TextStore.cs
- TreeViewBindingsEditorForm.cs
- ToolStripDropDownItem.cs
- LocalizableAttribute.cs
- AutoResizedEvent.cs
- StringDictionaryWithComparer.cs
- ThreadLocal.cs
- PixelFormat.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- counter.cs
- Avt.cs
- SettingsBindableAttribute.cs
- CommonObjectSecurity.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- DataGridViewComboBoxCell.cs
- AssemblyUtil.cs
- StrokeFIndices.cs
- Path.cs
- ColorConvertedBitmap.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- NativeActivity.cs
- ListViewItem.cs
- ParenthesizePropertyNameAttribute.cs
- XmlElementAttributes.cs
- DelimitedListTraceListener.cs
- CodeGenHelper.cs
- SqlBuffer.cs
- ExtractedStateEntry.cs
- JsonFaultDetail.cs
- PageStatePersister.cs
- PathGeometry.cs
- TableRowGroup.cs
- TypeUtil.cs
- LZCodec.cs
- DownloadProgressEventArgs.cs
- SharedUtils.cs
- SystemIPv6InterfaceProperties.cs
- MetafileHeaderWmf.cs
- FrameworkTextComposition.cs
- XmlDownloadManager.cs
- GiveFeedbackEventArgs.cs
- Literal.cs
- XmlLinkedNode.cs
- NameScope.cs
- SettingsContext.cs
- IconBitmapDecoder.cs
- DayRenderEvent.cs
- Region.cs
- RegionInfo.cs
- CommandManager.cs
- ButtonColumn.cs
- ExecutionEngineException.cs
- HtmlControlPersistable.cs
- HttpSessionStateWrapper.cs
- SynchronizationContext.cs
- CustomPopupPlacement.cs
- DetailsViewInsertedEventArgs.cs
- TraceListeners.cs
- VectorAnimationUsingKeyFrames.cs
- PersonalizableAttribute.cs
- CodeDOMUtility.cs
- GridErrorDlg.cs
- QueueProcessor.cs
- KeyConverter.cs
- ConstrainedDataObject.cs
- Utils.cs
- RequestCacheManager.cs
- CookielessHelper.cs
- ListView.cs
- BitmapEffectInputData.cs
- Transform.cs
- ContractHandle.cs
- Wrapper.cs
- CodeExporter.cs
- DbConnectionInternal.cs
- ServiceXNameTypeConverter.cs
- SQLMoney.cs
- XmlSchemaComplexContentExtension.cs
- Axis.cs
- UnsafeNativeMethods.cs
- ComponentGlyph.cs
- InputScopeManager.cs
- BreadCrumbTextConverter.cs
- IteratorDescriptor.cs
- GenericTextProperties.cs
- PluralizationServiceUtil.cs
- Directory.cs
- SqlConnectionFactory.cs
- DBCommand.cs
- Helpers.cs
- DataPointer.cs
- ChannelFactoryBase.cs
- XmlStreamNodeWriter.cs