Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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
- Journal.cs
- ByteRangeDownloader.cs
- MatrixTransform.cs
- SerializerWriterEventHandlers.cs
- AutomationInteropProvider.cs
- ListItemsCollectionEditor.cs
- SpnegoTokenProvider.cs
- SHA1.cs
- PropertyMap.cs
- ReadOnlyPropertyMetadata.cs
- XmlBaseReader.cs
- BuildTopDownAttribute.cs
- HttpResponse.cs
- TransactionManagerProxy.cs
- GPPOINTF.cs
- GradientBrush.cs
- ArgIterator.cs
- ThreadSafeList.cs
- DataExpression.cs
- WebControlParameterProxy.cs
- SpecularMaterial.cs
- Char.cs
- DbConnectionStringBuilder.cs
- SimplePropertyEntry.cs
- RegexRunnerFactory.cs
- RuntimeWrappedException.cs
- CompositionAdorner.cs
- NavigationPropertyAccessor.cs
- sqlser.cs
- InputBindingCollection.cs
- X509SecurityTokenAuthenticator.cs
- ContentType.cs
- DataSourceCache.cs
- ListViewCancelEventArgs.cs
- ThreadWorkerController.cs
- Frame.cs
- Pts.cs
- XPathSingletonIterator.cs
- XmlReader.cs
- UrlAuthorizationModule.cs
- isolationinterop.cs
- CompilationUtil.cs
- OutputScopeManager.cs
- WindowsImpersonationContext.cs
- PersonalizableTypeEntry.cs
- MouseGestureValueSerializer.cs
- InputLanguageManager.cs
- DependencyStoreSurrogate.cs
- ACE.cs
- SerializationStore.cs
- SafeNativeMethodsCLR.cs
- ElementMarkupObject.cs
- MemberRelationshipService.cs
- UnsafeNativeMethods.cs
- AggregateNode.cs
- WebPartExportVerb.cs
- Transform.cs
- CapabilitiesState.cs
- NameValueConfigurationElement.cs
- Transform3DCollection.cs
- WebUtility.cs
- Misc.cs
- Frame.cs
- HttpHandlerActionCollection.cs
- RealizationDrawingContextWalker.cs
- ParentUndoUnit.cs
- HtmlTable.cs
- OutputCacheSection.cs
- ResourceProviderFactory.cs
- ArrayWithOffset.cs
- LifetimeServices.cs
- SystemIPInterfaceStatistics.cs
- GestureRecognizer.cs
- XsdCachingReader.cs
- LambdaCompiler.Statements.cs
- EFColumnProvider.cs
- NamespaceInfo.cs
- GridViewEditEventArgs.cs
- Section.cs
- IsolationInterop.cs
- NonBatchDirectoryCompiler.cs
- InternalConfigConfigurationFactory.cs
- OleDbConnection.cs
- ErrorFormatterPage.cs
- Membership.cs
- AlphabetConverter.cs
- ClientSponsor.cs
- SignatureResourcePool.cs
- BuildManagerHost.cs
- HtmlEmptyTagControlBuilder.cs
- ToolStripManager.cs
- PointKeyFrameCollection.cs
- ReaderWriterLockWrapper.cs
- GlyphInfoList.cs
- XmlSchemaSequence.cs
- KeyProperty.cs
- SelectorItemAutomationPeer.cs
- Package.cs
- DataGridPagerStyle.cs
- FixedNode.cs