I was thinking about how to return values to LISP from .NET and played around with some code and came up with this.

It can be made more complete, but it is a place to start.

Code:
Public Function ObjectToTypedValue(ByRef objItem As Object)
        Dim intDatatype As Integer = Nothing
        If objItem Is Nothing Then
            intDatatype = 5000
            objItem = -1
        Else
            Select Case objItem.GetType
                Case GetType(Double)
                    intDatatype = 5001
                Case GetType(Point2d)
                    intDatatype = 5002
                Case GetType(Int16)
                    intDatatype = 5003
                Case GetType(String)
                    intDatatype = 5005
                Case GetType(ObjectId)
                    intDatatype = 5006
                Case GetType(Point3d)
                    intDatatype = 5009
                Case GetType(Int32)
                    intDatatype = 5010
                Case GetType(Boolean)
                    If objItem = False Then
                        intDatatype = 5019
                        objItem = -1
                    Else
                        intDatatype = 5021
                        objItem = -1
                    End If
            End Select
        End If
        If Not intDatatype = Nothing Then
            Return New TypedValue(intDatatype, objItem)
        End If
        Return Nothing
    End Function
Thoughts?