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
- Stylesheet.cs
- IdentitySection.cs
- WebPartPersonalization.cs
- SqlReferenceCollection.cs
- HwndSubclass.cs
- TdsValueSetter.cs
- DefaultCommandExtensionCallback.cs
- VirtualDirectoryMappingCollection.cs
- SystemColorTracker.cs
- InnerItemCollectionView.cs
- SoapUnknownHeader.cs
- WebResourceAttribute.cs
- SmtpDateTime.cs
- IpcClientManager.cs
- InvokeHandlers.cs
- Renderer.cs
- Constants.cs
- WebBrowserUriTypeConverter.cs
- WriterOutput.cs
- EditingCoordinator.cs
- AppSettingsReader.cs
- FontSourceCollection.cs
- UnconditionalPolicy.cs
- MouseActionValueSerializer.cs
- Rotation3D.cs
- XDRSchema.cs
- DelegateOutArgument.cs
- DocumentsTrace.cs
- DefaultTextStore.cs
- RedistVersionInfo.cs
- ScriptDescriptor.cs
- Statements.cs
- Function.cs
- TCEAdapterGenerator.cs
- LassoSelectionBehavior.cs
- OracleParameterCollection.cs
- _IPv4Address.cs
- ToolStripItemTextRenderEventArgs.cs
- UnsafeNativeMethods.cs
- Span.cs
- TextControlDesigner.cs
- ProxyManager.cs
- LazyTextWriterCreator.cs
- CheckedListBox.cs
- UrlPath.cs
- ExpandableObjectConverter.cs
- OperationResponse.cs
- SystemIPAddressInformation.cs
- Freezable.cs
- ExpressionBuilder.cs
- WebFaultClientMessageInspector.cs
- BitmapCodecInfoInternal.cs
- NamespaceCollection.cs
- ExtensionWindowResizeGrip.cs
- ImageSource.cs
- DataErrorValidationRule.cs
- SmiTypedGetterSetter.cs
- IIS7WorkerRequest.cs
- ReadonlyMessageFilter.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- WorkflowOperationAsyncResult.cs
- DecoderFallback.cs
- ToRequest.cs
- StateBag.cs
- CompositeFontInfo.cs
- GeneratedContractType.cs
- TokenBasedSetEnumerator.cs
- Base64Encoder.cs
- Control.cs
- DataGridViewCell.cs
- AnnotationDocumentPaginator.cs
- SchemaInfo.cs
- StylusPointPropertyInfoDefaults.cs
- ProtocolsSection.cs
- PrivateFontCollection.cs
- TryCatchDesigner.xaml.cs
- FormsAuthenticationCredentials.cs
- CacheMemory.cs
- TemplateControlBuildProvider.cs
- SqlTriggerAttribute.cs
- CapabilitiesRule.cs
- EntityViewGenerationAttribute.cs
- VectorCollectionConverter.cs
- FormatSelectingMessageInspector.cs
- TemplateControlParser.cs
- X509Certificate2Collection.cs
- LoginDesignerUtil.cs
- uribuilder.cs
- ListControlActionList.cs
- RijndaelManagedTransform.cs
- ScrollViewerAutomationPeer.cs
- DeferredElementTreeState.cs
- DataSourceControlBuilder.cs
- RequestTimeoutManager.cs
- ProcessThreadCollection.cs
- Math.cs
- Matrix.cs
- TagNameToTypeMapper.cs
- Vector3DAnimationUsingKeyFrames.cs
- DayRenderEvent.cs