Gets the correct value for the Enum.

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

Syntax

C#
public virtual Object GetValue(
	Object code
)
Visual Basic
Public Overridable Function GetValue ( _
	code As Object _
) As Object
Visual C++
public:
virtual Object^ GetValue(
	Object^ code
)

Parameters

code
Type: System..::..Object
The value to convert (an enum instance).

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