hello,
i need your help to made a method that return more than one value...
i'm working on visual studio and making an application (a small game) for my formation...
i've created class composed of other classes in which one i need to call a method of an other one and i want that this method return four values...
i think taht i can do that by giving a table by ref to my method that will be completed by it...
but i'm looking for a way more conventional, that's why i'm asking for your help...
thanks.

Recommended Answers

All 2 Replies

If you want a method to return more than one value you could use an array or a list, or stuff all your info in a struct and return that struct.

Then there is always the "out" param. if you choose to go that route. But I would go with Danny's suggestion before I messed with outs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.