Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / Int64Converter.cs / 1 / Int64Converter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using Microsoft.Win32; 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 Int64Converter : BaseNumberConverter { ///Provides a type converter to convert 64-bit signed 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(Int64); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToInt64(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Int64.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 Int64.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Int64)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.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 Int64Converter : BaseNumberConverter { ///Provides a type converter to convert 64-bit signed 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(Int64); } } ////// Convert the given value to a string using the given radix /// internal override object FromString(string value, int radix) { return Convert.ToInt64(value, radix); } ////// Convert the given value to a string using the given formatInfo /// internal override object FromString(string value, NumberFormatInfo formatInfo) { return Int64.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 Int64.Parse(value, culture); } ////// Convert the given value from a string using the given formatInfo /// internal override string ToString(object value, NumberFormatInfo formatInfo) { return ((Int64)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
- XsdBuilder.cs
- SqlCaseSimplifier.cs
- ThicknessAnimationBase.cs
- BuildTopDownAttribute.cs
- Environment.cs
- Int64Storage.cs
- SupportingTokenSpecification.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- DelegatedStream.cs
- SystemDropShadowChrome.cs
- Publisher.cs
- NavigationFailedEventArgs.cs
- PatternMatcher.cs
- FormatStringEditor.cs
- CodeDOMProvider.cs
- RankException.cs
- ExpressionStringBuilder.cs
- DrawingState.cs
- XmlSchemaValidator.cs
- ClientBuildManagerCallback.cs
- BmpBitmapDecoder.cs
- Renderer.cs
- StandardOleMarshalObject.cs
- AppDomain.cs
- MiniLockedBorderGlyph.cs
- FlowDocumentPage.cs
- AmbientProperties.cs
- MainMenu.cs
- ServiceOperationWrapper.cs
- StreamInfo.cs
- SemanticResolver.cs
- LinqToSqlWrapper.cs
- CreateUserWizardDesigner.cs
- streamingZipPartStream.cs
- Deflater.cs
- XsdDataContractExporter.cs
- Pair.cs
- SqlPersonalizationProvider.cs
- ServiceControllerDesigner.cs
- SortedSetDebugView.cs
- DetailsViewInsertEventArgs.cs
- RIPEMD160.cs
- NumericUpDownAcceleration.cs
- PathGeometry.cs
- NetworkInterface.cs
- ApplicationDirectory.cs
- XsltLoader.cs
- InputDevice.cs
- CompModSwitches.cs
- GPRECT.cs
- TextServicesCompartment.cs
- ToolStripHighContrastRenderer.cs
- Lazy.cs
- HtmlInputCheckBox.cs
- ValidationHelper.cs
- SQLInt16Storage.cs
- Pointer.cs
- followingsibling.cs
- OutKeywords.cs
- CustomBindingElementCollection.cs
- UnsafeNativeMethods.cs
- ControlBindingsCollection.cs
- __Filters.cs
- PropertyCondition.cs
- ConfigurationStrings.cs
- RichTextBox.cs
- QueryHandler.cs
- BrushConverter.cs
- WebPageTraceListener.cs
- SponsorHelper.cs
- DataObjectMethodAttribute.cs
- MediaScriptCommandRoutedEventArgs.cs
- SemanticValue.cs
- AsymmetricSignatureFormatter.cs
- NameGenerator.cs
- XamlBuildProvider.cs
- InvalidOleVariantTypeException.cs
- dbdatarecord.cs
- keycontainerpermission.cs
- updatecommandorderer.cs
- InputLanguageManager.cs
- ShaperBuffers.cs
- hebrewshape.cs
- ScriptingJsonSerializationSection.cs
- WorkflowView.cs
- Cursor.cs
- ConnectionManagementElement.cs
- GeneralTransform3DTo2DTo3D.cs
- InvokePattern.cs
- Util.cs
- BitmapDecoder.cs
- PolicyStatement.cs
- ChameleonKey.cs
- rsa.cs
- XsdBuildProvider.cs
- SignatureHelper.cs
- DebuggerAttributes.cs
- ErrorItem.cs
- ReadOnlyDictionary.cs
- DataServiceQuery.cs