Skip to content

6a455d71 866b dbf5 817c 65d871d5398b

Kim Hugener-Ohlsen edited this page May 28, 2016 · 2 revisions

SpatialExtensions.ToVolume(TValue) Method

Gets the value as the specified unit.

Namespace: Sundew.Quantities.Spatial
Assembly: Sundew.Quantities (in Sundew.Quantities.dll) Version: 1.0.2.0 (1.0.2.0)

Syntax

C#

public static Volume ToVolume<TValue>(
	this TValue value,
	SelectUnit<VolumeUnitSelector> unitSelector
)
where TValue : struct, new(), IComparable, IFormattable

C#

public static Volume ToVolume<TValue>(
	this TValue value,
	SelectUnit<VolumeUnitSelector> unitSelector
)
where TValue : struct, new(), IComparable, IFormattable

VB

<ExtensionAttribute>
Public Shared Function ToVolume(Of TValue As {Structure, New, IComparable, IFormattable}) ( 
	value As TValue,
	unitSelector As SelectUnit(Of VolumeUnitSelector)
) As Volume

VB

<ExtensionAttribute>
Public Shared Function ToVolume(Of TValue As {Structure, New, IComparable, IFormattable}) ( 
	value As TValue,
	unitSelector As SelectUnit(Of VolumeUnitSelector)
) As Volume

C++

public:
[ExtensionAttribute]
generic<typename TValue>
where TValue : value class, gcnew(), IComparable, IFormattable
static Volume^ ToVolume(
	TValue value, 
	SelectUnit<VolumeUnitSelector^>^ unitSelector
)

C++

public:
[ExtensionAttribute]
generic<typename TValue>
where TValue : value class, gcnew(), IComparable, IFormattable
static Volume^ ToVolume(
	TValue value, 
	SelectUnit<VolumeUnitSelector^>^ unitSelector
)

F#

[<ExtensionAttribute>]
static member ToVolume : 
        value : 'TValue * 
        unitSelector : SelectUnit<VolumeUnitSelector> -> Volume  when 'TValue : struct, new() and IComparable and IFormattable

F#

[<ExtensionAttribute>]
static member ToVolume : 
        value : 'TValue * 
        unitSelector : SelectUnit<VolumeUnitSelector> -> Volume  when 'TValue : struct, new() and IComparable and IFormattable

Parameters

 

value
Type: TValue
The volume value.
unitSelector
Type: Sundew.Quantities.Engine.UnitSelection.SelectUnit(VolumeUnitSelector)
The unit selector.

Type Parameters

 

TValue
The type of the value.

Return Value

Type: Volume
A new Volume.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

SpatialExtensions Class
Sundew.Quantities.Spatial Namespace

Clone this wiki locally