7
Reply

How many values return through a method at a time?

Bittu Kumar

Bittu Kumar

8y
1.5k
1
Reply
    No it is not. You can return an object though and that object can contain multiple properties –
    Method never return function alone returns ...
    You can return in multiple ways:using single object which can have many properties. that is standard.Using Out parameter.Using Tuple you can return two values.
    It can return an object though that object can contain multiple properties
    It depends, if we want to return multiple values, can use tuple, classes, struct or anonymous types
    It depends, if we want to return multiple values, can use tuple, classes, struct or anonymous types
    Depends on requirements if you want to return multiple string values need to create Array of string like : public string[] returnValues() { //to do code and return array of string }