How to return the equivalent of a VB6 Variant type from a method in C#
问题 I have an older VB6 app that has a function RunReturningVAR it is a db call that could return an int , string , double ..... but not a RecordSet . It was built very generically so that it can be called by multiple other functions so we don't have multiple locations for DB calls. what I currently have is attached. Public Function RunReturningVar(ByVal vstrSql As String, _ Optional ByVal connval As Boolean = False, _ Optional ByVal copyID As Double = 0, _ Optional ByVal corpVal As Boolean =