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
- DefaultConfirmation.cs
- ECDsaCng.cs
- FlowLayoutPanelDesigner.cs
- CodeDOMUtility.cs
- DocumentApplicationState.cs
- FormatterConverter.cs
- KnownIds.cs
- PersonalizationEntry.cs
- SqlDependencyUtils.cs
- ToolStripAdornerWindowService.cs
- DataGridViewCellValidatingEventArgs.cs
- DrawTreeNodeEventArgs.cs
- ApplicationBuildProvider.cs
- transactioncontext.cs
- OdbcConnectionFactory.cs
- SocketException.cs
- CodeStatementCollection.cs
- WorkflowInlining.cs
- ClaimComparer.cs
- Literal.cs
- WeakRefEnumerator.cs
- ConstraintManager.cs
- XMLDiffLoader.cs
- EntityCollection.cs
- TextServicesHost.cs
- AttributeEmitter.cs
- RewritingSimplifier.cs
- RangeValueProviderWrapper.cs
- IPGlobalProperties.cs
- XamlParser.cs
- PhysicalFontFamily.cs
- SafeArrayRankMismatchException.cs
- AbstractDataSvcMapFileLoader.cs
- TTSEngineTypes.cs
- NativeWindow.cs
- XPathChildIterator.cs
- WebConfigurationFileMap.cs
- ImageDesigner.cs
- WebServiceErrorEvent.cs
- CodeLinePragma.cs
- NetworkInformationPermission.cs
- SoapBinding.cs
- SoapAttributeOverrides.cs
- WindowsListViewGroup.cs
- CqlErrorHelper.cs
- HtmlInputReset.cs
- Baml6ConstructorInfo.cs
- SqlNodeTypeOperators.cs
- ValueSerializer.cs
- DataRowView.cs
- XmlSchemaSimpleContentExtension.cs
- shaper.cs
- SqlTriggerContext.cs
- RegistrationServices.cs
- DllNotFoundException.cs
- Bitmap.cs
- HeaderedContentControl.cs
- CommandPlan.cs
- LifetimeServices.cs
- HttpRequest.cs
- ObjectHandle.cs
- PropertyValueEditor.cs
- PipeSecurity.cs
- WasHttpModulesInstallComponent.cs
- SQLCharsStorage.cs
- ProxySimple.cs
- ApplicationBuildProvider.cs
- FileStream.cs
- ListViewAutomationPeer.cs
- TreeViewImageIndexConverter.cs
- EntityDataSourceContainerNameItem.cs
- SmtpLoginAuthenticationModule.cs
- Set.cs
- SymDocumentType.cs
- WeakReferenceList.cs
- MediaPlayerState.cs
- TimelineGroup.cs
- NominalTypeEliminator.cs
- DbDataSourceEnumerator.cs
- PackageDigitalSignature.cs
- FloatMinMaxAggregationOperator.cs
- ObjectStateFormatter.cs
- GeneratedCodeAttribute.cs
- AddValidationError.cs
- ConsoleTraceListener.cs
- TextTreeRootTextBlock.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- PagedDataSource.cs
- DetailsViewUpdateEventArgs.cs
- StateBag.cs
- ExpressionEditorAttribute.cs
- CommentAction.cs
- Symbol.cs
- EntityExpressionVisitor.cs
- DataQuery.cs
- BrushMappingModeValidation.cs
- CallbackException.cs
- SystemFonts.cs
- ParallelLoopState.cs
- Matrix.cs