Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectUtils.IsAssignable Method

Determine if the given Type is assignable from the given value, assuming setting by reflection and taking care of transparent proxies.

[Visual Basic]
Public Shared Sub IsAssignable( _
   ByVal type As Type, _
   ByVal obj As Object _
)
[C#]
public static bool IsAssignable(
   Type type,
   object obj
);

Parameters

type
The target Type.
obj
The value that should be assigned to the type.

Return Value

True if the type is assignable from the value.

Remarks

Considers primitive wrapper classes as assignable to the corresponding primitive types.

For example used in an object factory's constructor resolution.

See Also

ObjectUtils Class | Spring.Util Namespace