Click here to Skip to main content
15,903,012 members
Home / Discussions / C#
   

C#

 
GeneralRe: Returning multiple values from methods Pin
Marc Clifton22-May-04 15:03
mvaMarc Clifton22-May-04 15:03 
GeneralRe: Returning multiple values from methods Pin
bjoernen22-May-04 22:18
bjoernen22-May-04 22:18 
GeneralRe: Returning multiple values from methods Pin
Marc Clifton23-May-04 2:59
mvaMarc Clifton23-May-04 2:59 
GeneralRe: Returning multiple values from methods Pin
bjoernen23-May-04 5:43
bjoernen23-May-04 5:43 
GeneralRe: Returning multiple values from methods Pin
Heath Stewart23-May-04 3:59
protectorHeath Stewart23-May-04 3:59 
GeneralRe: Returning multiple values from methods Pin
leppie22-May-04 19:45
leppie22-May-04 19:45 
GeneralRe: Returning multiple values from methods Pin
Heath Stewart23-May-04 3:56
protectorHeath Stewart23-May-04 3:56 
GeneralRe: Returning multiple values from methods Pin
bjoernen23-May-04 6:03
bjoernen23-May-04 6:03 
Since out parameters exist, I can't see why Lua-style multiple return values would be difficult to implement in the C# language. In it's rude form it could translate Lua-style method return syntax to the "out"-syntax.

Calling:

int a;<br />
int b;<br />
int c;<br />
a, b, c = BiteMe(x, y, z);


before compilation translates to ->

int a;<br />
int b;<br />
int c;<br />
BiteMe(x, y, z, out a, out b, out c);



Declaring:

public int a, int b, int c BiteMe(int x, int y, int z)<br />
{<br />
  return x, y, z;<br />
}


before compilation translates to ->

public void BiteMe(int x, int y, int z, out int a, out int b, out int c)<br />
{<br />
  a = x;<br />
  b = y;<br />
  c = z;<br />
}


Regards,
Björn Morén
Stockholm, Sweden

GeneralRe: Returning multiple values from methods Pin
MilesAhead24-May-04 7:34
MilesAhead24-May-04 7:34 
GeneralCausing a time delay within a method Pin
Anonymous22-May-04 11:57
Anonymous22-May-04 11:57 
GeneralRe: Causing a time delay within a method Pin
bjoernen22-May-04 12:55
bjoernen22-May-04 12:55 
GeneralRe: Causing a time delay within a method Pin
Colin Angus Mackay22-May-04 12:56
Colin Angus Mackay22-May-04 12:56 
GeneralRe: Causing a time delay within a method Pin
Marc Clifton22-May-04 15:00
mvaMarc Clifton22-May-04 15:00 
GeneralStackFrame Pin
TuringTest122-May-04 11:16
TuringTest122-May-04 11:16 
GeneralRe: StackFrame Pin
Colin Angus Mackay22-May-04 13:03
Colin Angus Mackay22-May-04 13:03 
GeneralRe: StackFrame Pin
Marc Clifton22-May-04 15:11
mvaMarc Clifton22-May-04 15:11 
GeneralRe: StackFrame Pin
TuringTest122-May-04 16:33
TuringTest122-May-04 16:33 
GeneralRe: StackFrame Pin
leppie23-May-04 2:22
leppie23-May-04 2:22 
GeneralRe: StackFrame Pin
TuringTest123-May-04 10:47
TuringTest123-May-04 10:47 
GeneralRe: StackFrame Pin
Heath Stewart23-May-04 3:53
protectorHeath Stewart23-May-04 3:53 
GeneralFile size Pin
PaleyX22-May-04 8:31
PaleyX22-May-04 8:31 
GeneralRe: File size Pin
MyBlindy22-May-04 8:53
MyBlindy22-May-04 8:53 
GeneralRe: File size Pin
PaleyX22-May-04 13:31
PaleyX22-May-04 13:31 
GeneralRe: File size Pin
Member 93002222-May-04 8:59
Member 93002222-May-04 8:59 
GeneralRCW question when returning a string Pin
Nish Nishant22-May-04 3:33
sitebuilderNish Nishant22-May-04 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.