Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Currency.cs / 1 / Currency.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System { using System; using System.Globalization; using System.Runtime.CompilerServices; [Serializable] internal struct Currency { internal long m_value; // Constructs a Currency from a Decimal value. // public Currency(Decimal value) { m_value = Decimal.ToCurrency(value).m_value; } // Constructs a Currency from a long value without scaling. The // ignored parameter exists only to distinguish this constructor // from the constructor that takes a long. Used only in the System // package, especially in Variant. internal Currency(long value, int ignored) { m_value = value; } // Creates a Currency from an OLE Automation Currency. This method // applies no scaling to the Currency value, essentially doing a bitwise // copy. // public static Currency FromOACurrency(long cy){ return new Currency(cy, 0); } //Creates an OLE Automation Currency from a Currency instance. This // method applies no scaling to the Currency value, essentially doing // a bitwise copy. // public long ToOACurrency() { return m_value; } // Converts a Currency to a Decimal. // public static Decimal ToDecimal(Currency c) { Decimal result = new Decimal (); FCallToDecimal (ref result, c); return result; } [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern void FCallToDecimal(ref Decimal result,Currency c); } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AttachedPropertyBrowsableAttribute.cs
- ManagementQuery.cs
- Point4DConverter.cs
- XamlBrushSerializer.cs
- ETagAttribute.cs
- VariantWrapper.cs
- ForeignConstraint.cs
- Drawing.cs
- CompoundFileStorageReference.cs
- ToolStripItemEventArgs.cs
- Model3D.cs
- TextRenderer.cs
- SetStateEventArgs.cs
- XmlReflectionImporter.cs
- DataGridViewCheckBoxColumn.cs
- Odbc32.cs
- LazyLoadBehavior.cs
- EncoderBestFitFallback.cs
- JournalNavigationScope.cs
- IndexedString.cs
- Item.cs
- versioninfo.cs
- SemaphoreFullException.cs
- ConditionalAttribute.cs
- Image.cs
- SoapHeader.cs
- AppLevelCompilationSectionCache.cs
- SystemIPInterfaceProperties.cs
- CodeCatchClauseCollection.cs
- CodeStatementCollection.cs
- NamespaceExpr.cs
- XmlReader.cs
- OdbcFactory.cs
- BindingWorker.cs
- GridEntryCollection.cs
- DependencyPropertyHelper.cs
- XmlnsDictionary.cs
- HttpListenerResponse.cs
- ErrorView.xaml.cs
- TextCompositionEventArgs.cs
- TypeTypeConverter.cs
- ISO2022Encoding.cs
- DmlSqlGenerator.cs
- IdentityHolder.cs
- Int32RectValueSerializer.cs
- RelationshipSet.cs
- CacheChildrenQuery.cs
- DataGridViewSortCompareEventArgs.cs
- SiteMapHierarchicalDataSourceView.cs
- MatrixCamera.cs
- Bold.cs
- XLinq.cs
- GridViewUpdatedEventArgs.cs
- SiteMapHierarchicalDataSourceView.cs
- XmlIterators.cs
- TextRunCache.cs
- Task.cs
- WebControlParameterProxy.cs
- InvokePatternIdentifiers.cs
- Avt.cs
- ADRoleFactoryConfiguration.cs
- TableParaClient.cs
- WebUtil.cs
- FindCompletedEventArgs.cs
- ProviderCommandInfoUtils.cs
- Filter.cs
- IdentityModelStringsVersion1.cs
- FileLevelControlBuilderAttribute.cs
- Thread.cs
- SqlUtil.cs
- XComponentModel.cs
- WindowAutomationPeer.cs
- ContainerUIElement3D.cs
- ServiceInfoCollection.cs
- XmlEntity.cs
- InvalidEnumArgumentException.cs
- BufferedWebEventProvider.cs
- CollectionChange.cs
- AttachedAnnotationChangedEventArgs.cs
- DiagnosticsConfigurationHandler.cs
- BufferAllocator.cs
- Win32.cs
- SerialReceived.cs
- CompilerParameters.cs
- RefreshResponseInfo.cs
- QilLiteral.cs
- AssemblyUtil.cs
- ClientUrlResolverWrapper.cs
- HttpWrapper.cs
- SmtpNegotiateAuthenticationModule.cs
- LinearGradientBrush.cs
- ErrorLog.cs
- CustomError.cs
- Win32SafeHandles.cs
- XmlSchemaInferenceException.cs
- SerializationSectionGroup.cs
- ChannelBinding.cs
- ContentType.cs
- LayoutEditorPart.cs
- Style.cs