Axel

Axel

  • NA
  • 5
  • 0

Method that return a bunch of variables

Feb 19 2009 4:55 AM

Hi all,

I have got the following problem and would appreaciate if someone can help me:

There are several classes that enlarge the former ones by inheritance (e.g. the derived classes have more variables). What I would like to have is one method e.g. "get_relevant_variables()" that returns all variables that might be of interest in the particular class.

This method can be marked as virtual and maybe overwritten afterwards. The Problem is, that the return object has to be different (dependent on the relevant variables in the particular class). I would like to have just one method that receive the particular variables from outside.

I have tried to use Collection<object> which works, but seems to be unelegant since I have to return lots of variables.

Many thanks in advance
Axel


Answers (4)