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
- ButtonField.cs
- FormViewInsertEventArgs.cs
- TextRangeAdaptor.cs
- Rules.cs
- WorkflowServiceHostFactory.cs
- TextWriter.cs
- XmlUnspecifiedAttribute.cs
- TextSerializer.cs
- GeometryModel3D.cs
- MailMessage.cs
- DataControlLinkButton.cs
- RemoteHelper.cs
- SqlFunctions.cs
- ListViewItem.cs
- Compilation.cs
- xdrvalidator.cs
- IUnknownConstantAttribute.cs
- Command.cs
- LinqToSqlWrapper.cs
- WindowInteropHelper.cs
- EmissiveMaterial.cs
- AudioDeviceOut.cs
- Stylesheet.cs
- InfoCardAsymmetricCrypto.cs
- DispatcherProcessingDisabled.cs
- OdbcCommandBuilder.cs
- _SslSessionsCache.cs
- WindowsFont.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- CompensatableTransactionScopeActivityDesigner.cs
- XamlClipboardData.cs
- ScriptReferenceEventArgs.cs
- ContentFileHelper.cs
- LinqDataSourceContextData.cs
- TextEffect.cs
- DBConcurrencyException.cs
- SettingsBindableAttribute.cs
- DeflateInput.cs
- NavigationFailedEventArgs.cs
- WinEventTracker.cs
- XmlNode.cs
- InternalMappingException.cs
- Helpers.cs
- JsonServiceDocumentSerializer.cs
- AssemblyHash.cs
- SplitterPanel.cs
- HtmlControlPersistable.cs
- SqlParameterizer.cs
- Assert.cs
- ADMembershipUser.cs
- Matrix.cs
- LambdaCompiler.Unary.cs
- ECDiffieHellman.cs
- CssStyleCollection.cs
- WindowsToolbar.cs
- RunClient.cs
- LockCookie.cs
- PtsHelper.cs
- EventLogEntryCollection.cs
- Triplet.cs
- BackgroundWorker.cs
- AnimationException.cs
- ValidationResults.cs
- ProfileManager.cs
- x509store.cs
- ToolStripDropTargetManager.cs
- DataBindingHandlerAttribute.cs
- TextWriterTraceListener.cs
- ToolStripContainer.cs
- Point4D.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- AutomationIdentifier.cs
- CardSpacePolicyElement.cs
- DataBindingHandlerAttribute.cs
- MatrixCamera.cs
- ReliabilityContractAttribute.cs
- WebHttpBehavior.cs
- CodeDefaultValueExpression.cs
- Reference.cs
- DbModificationCommandTree.cs
- SqlCachedBuffer.cs
- ImmutableObjectAttribute.cs
- ExtentCqlBlock.cs
- BinaryCommonClasses.cs
- FormatConvertedBitmap.cs
- SqlConnectionManager.cs
- EventProviderWriter.cs
- SerialReceived.cs
- PersistenceTypeAttribute.cs
- HwndMouseInputProvider.cs
- ListItem.cs
- BitmapInitialize.cs
- SQLByteStorage.cs
- XsltConvert.cs
- DataGridViewTopLeftHeaderCell.cs
- ScriptControlManager.cs
- UpDownBaseDesigner.cs
- ListenerUnsafeNativeMethods.cs
- CacheChildrenQuery.cs
- DictationGrammar.cs