Does anyone know of a way to access the list of methods for a given object programatically? I have a grid object whose cells contain varying types of data. If I want to get the text displayed in the cell, I need to call the ToString method for that cell. However, each cell has a varying number of ToString methods (ToString, ToString2, ToString3, etc) I'm not sure how many of them there will be, so using IsSupported probably isn't my best bet. I do know that the last ToString method for each cell is the one I need to call. What I'd like to do is get a list of the supported methods for a given cell, iterate over those, and determine the applicable ToString method. Any help would be most appreciated.
Here's what I came up with for a solution, in case anyone's interested.
public function getToString(obj)
i = 10
if i = 1 then
strToStringMethod = "ToString"
strToStringMethod = "ToString" + CStr(i)
if IsSupported(obj,strToStringMethod) then
i = i - 1
loop while i > 0
getToString= null 'if we've looped over and there are no ToString methods on the object, return a null value