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
- PingReply.cs
- CachedTypeface.cs
- DeclaredTypeElementCollection.cs
- InternalTypeHelper.cs
- BasicSecurityProfileVersion.cs
- cookieexception.cs
- Typeface.cs
- CfgRule.cs
- ChannelDispatcher.cs
- UpdatePanelControlTrigger.cs
- EncoderBestFitFallback.cs
- ApplicationSecurityInfo.cs
- GridViewColumnHeaderAutomationPeer.cs
- DependencyPropertyValueSerializer.cs
- TypeListConverter.cs
- Thumb.cs
- HandlerMappingMemo.cs
- SemanticResultValue.cs
- Semaphore.cs
- GridLengthConverter.cs
- StylusCollection.cs
- CurrencyWrapper.cs
- ImpersonationContext.cs
- Events.cs
- EventData.cs
- GlyphRunDrawing.cs
- WebPartDescription.cs
- InArgumentConverter.cs
- DataSetViewSchema.cs
- HtmlInputReset.cs
- ContainerUtilities.cs
- ComponentEditorForm.cs
- DateTimeOffset.cs
- DesignerGenericWebPart.cs
- xsdvalidator.cs
- Polyline.cs
- BaseDataList.cs
- SyntaxCheck.cs
- TextEditorDragDrop.cs
- CheckBoxRenderer.cs
- ClickablePoint.cs
- ParentQuery.cs
- ObjectFullSpanRewriter.cs
- XmlQueryType.cs
- XmlDesigner.cs
- DataGridViewColumnCollection.cs
- KerberosRequestorSecurityToken.cs
- Int32KeyFrameCollection.cs
- UserPreference.cs
- TrackPointCollection.cs
- SqlCacheDependencyDatabase.cs
- IsolatedStorageFile.cs
- PersonalizableAttribute.cs
- RC2CryptoServiceProvider.cs
- BlockCollection.cs
- CompatibleIComparer.cs
- MultiView.cs
- DiscoveryClientReferences.cs
- RangeBaseAutomationPeer.cs
- SpellerInterop.cs
- DataGridTableCollection.cs
- COM2Properties.cs
- IndexOutOfRangeException.cs
- OptimisticConcurrencyException.cs
- XPathSelfQuery.cs
- ScrollItemPatternIdentifiers.cs
- ItemMap.cs
- FixedStringLookup.cs
- ObjectToIdCache.cs
- QueryIntervalOp.cs
- SweepDirectionValidation.cs
- COAUTHINFO.cs
- MainMenu.cs
- MachineKeySection.cs
- TransformGroup.cs
- DependencyObjectPropertyDescriptor.cs
- DefaultParameterValueAttribute.cs
- DataBindingsDialog.cs
- FilterUserControlBase.cs
- CommonDialog.cs
- Vector3DAnimation.cs
- Button.cs
- HttpStreamXmlDictionaryWriter.cs
- XmlNodeReader.cs
- DocumentViewerHelper.cs
- DbReferenceCollection.cs
- Stopwatch.cs
- CursorConverter.cs
- exports.cs
- RowCache.cs
- AxisAngleRotation3D.cs
- DynamicDataManager.cs
- PanelStyle.cs
- RelationshipDetailsRow.cs
- MultiTouchSystemGestureLogic.cs
- SequentialWorkflowHeaderFooter.cs
- TextControl.cs
- NonVisualControlAttribute.cs
- SemanticResultValue.cs
- BrowserCapabilitiesFactory35.cs