Gets the correct value for the Enum.

Namespace:  NHibernate.Type
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Function GetValue ( _
	code As Object _
) As Object
C#
public virtual Object GetValue(
	Object code
)
Visual C++
public:
virtual Object^ GetValue(
	Object^ code
)
JavaScript
function getValue(code);

Parameters

code
Type: System..::.Object
The value to convert.

Return Value

A boxed version of the code converted to the correct type.

Remarks

This handles situations where the DataProvider returns the value of the Enum from the db in the wrong underlying type. It uses Convert to convert it to the correct type.

See Also