Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ByteConverter.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PointCollection.cs
- LinkedResource.cs
- DataBoundControlHelper.cs
- Zone.cs
- ViewEventArgs.cs
- SchemaTableOptionalColumn.cs
- ClientTargetSection.cs
- ReferencedType.cs
- EdmRelationshipRoleAttribute.cs
- LinkClickEvent.cs
- RuleSettingsCollection.cs
- HatchBrush.cs
- ObfuscateAssemblyAttribute.cs
- SecurityState.cs
- CancelRequestedRecord.cs
- GeneralTransform3D.cs
- UICuesEvent.cs
- WindowsToolbar.cs
- SerializationInfoEnumerator.cs
- SqlAliasesReferenced.cs
- InkCanvasFeedbackAdorner.cs
- CollectionBase.cs
- FacetValueContainer.cs
- ClientCultureInfo.cs
- CodeAttributeDeclaration.cs
- CapabilitiesRule.cs
- MultipleViewProviderWrapper.cs
- WorkflowExecutor.cs
- Metafile.cs
- UxThemeWrapper.cs
- localization.cs
- DataFormat.cs
- TimeManager.cs
- GlyphingCache.cs
- StringUtil.cs
- DependencyPropertyChangedEventArgs.cs
- ActiveXSite.cs
- XDRSchema.cs
- ConfigXmlSignificantWhitespace.cs
- UICuesEvent.cs
- SettingsContext.cs
- ProcessModelInfo.cs
- XsdDateTime.cs
- PerformanceCounterLib.cs
- EditorBrowsableAttribute.cs
- GridSplitter.cs
- ObjectDataSourceView.cs
- TTSEngineProxy.cs
- DES.cs
- MouseButtonEventArgs.cs
- EventItfInfo.cs
- SmiContextFactory.cs
- PermissionAttributes.cs
- Compiler.cs
- CmsInterop.cs
- DataGridViewLinkColumn.cs
- CngProvider.cs
- TypeUtils.cs
- ImageAutomationPeer.cs
- TriggerBase.cs
- Stack.cs
- EntitySqlQueryCacheEntry.cs
- WpfXamlType.cs
- ContextCorrelationInitializer.cs
- FullTextState.cs
- CompressEmulationStream.cs
- ModifierKeysValueSerializer.cs
- TextTreeFixupNode.cs
- CompositeControl.cs
- XsdBuilder.cs
- NamedPermissionSet.cs
- DSASignatureDeformatter.cs
- entityreference_tresulttype.cs
- TextUtf8RawTextWriter.cs
- ForwardPositionQuery.cs
- SubqueryTrackingVisitor.cs
- SystemFonts.cs
- ChtmlImageAdapter.cs
- SHA256.cs
- DurableDispatcherAddressingFault.cs
- NetWebProxyFinder.cs
- RankException.cs
- RoleService.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- LazyLoadBehavior.cs
- HScrollProperties.cs
- ServiceRoute.cs
- X509CertificateStore.cs
- BitmapEffectState.cs
- SpeechSynthesizer.cs
- ExpressionBuilderCollection.cs
- TypedCompletedAsyncResult.cs
- RemoteWebConfigurationHostServer.cs
- TransactionBehavior.cs
- SafeRightsManagementEnvironmentHandle.cs
- TextParentUndoUnit.cs
- DetailsViewModeEventArgs.cs
- ListViewTableRow.cs
- PolicyManager.cs
- ContainerControl.cs