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
- ChangeBlockUndoRecord.cs
- AppDomainAttributes.cs
- OdbcEnvironment.cs
- ApplicationDirectory.cs
- FormViewActionList.cs
- Point3DCollection.cs
- ContextDataSource.cs
- MetadataCache.cs
- EntitySetBaseCollection.cs
- Rotation3DAnimation.cs
- DbgCompiler.cs
- ExclusiveTcpListener.cs
- Utilities.cs
- FieldBuilder.cs
- DesignerActionUIService.cs
- control.ime.cs
- externdll.cs
- Module.cs
- ErrorHandler.cs
- XmlSchemaSimpleContentExtension.cs
- DispatchWrapper.cs
- CheckBox.cs
- ColorContext.cs
- DataServiceRequestException.cs
- ToolBarTray.cs
- WebPartZoneCollection.cs
- SafeHandles.cs
- TransmissionStrategy.cs
- GeneralTransformGroup.cs
- SQLSingle.cs
- ImportDesigner.xaml.cs
- CalculatedColumn.cs
- WindowsFormsHostPropertyMap.cs
- ProjectedWrapper.cs
- AuthenticatedStream.cs
- DelegateBodyWriter.cs
- UIElement.cs
- ImageMap.cs
- Geometry3D.cs
- XPathAncestorIterator.cs
- StoreAnnotationsMap.cs
- XmlSchemaComplexContentRestriction.cs
- FixUp.cs
- CompilerScope.Storage.cs
- PeerResolverMode.cs
- DataBoundControlAdapter.cs
- DefaultAuthorizationContext.cs
- SessionStateContainer.cs
- MimeImporter.cs
- AutoGeneratedFieldProperties.cs
- RegexWorker.cs
- ReflectEventDescriptor.cs
- SemanticAnalyzer.cs
- TreeBuilder.cs
- XhtmlConformanceSection.cs
- wgx_render.cs
- EmptyElement.cs
- WindowPattern.cs
- DynamicArgumentDialog.cs
- WebPartTracker.cs
- IteratorDescriptor.cs
- MenuItem.cs
- KoreanCalendar.cs
- Vars.cs
- FragmentNavigationEventArgs.cs
- StateItem.cs
- Guid.cs
- FormCollection.cs
- COMException.cs
- ToolStripComboBox.cs
- HighlightComponent.cs
- ColumnTypeConverter.cs
- MsmqPoisonMessageException.cs
- HttpHandlersInstallComponent.cs
- Soap.cs
- DesignerExtenders.cs
- ContentType.cs
- SHA384.cs
- XsltContext.cs
- RadioButtonRenderer.cs
- SerialStream.cs
- brushes.cs
- _ServiceNameStore.cs
- AppSecurityManager.cs
- DrawToolTipEventArgs.cs
- NoClickablePointException.cs
- XPathNavigator.cs
- LifetimeMonitor.cs
- DragStartedEventArgs.cs
- ServicesUtilities.cs
- BehaviorEditorPart.cs
- DataGridViewCellStyle.cs
- DataColumnMappingCollection.cs
- WeakHashtable.cs
- SecUtil.cs
- FlagsAttribute.cs
- CollectionDataContract.cs
- SamlAssertionKeyIdentifierClause.cs
- OleDbCommand.cs
- DeferrableContentConverter.cs