Ary Borenszweig wrote: > In C# when you define a function that takes an out or ref parameter, > when invoking that function you must also specify ref or out. For example: > > void fun(ref uint x, double y); > > uint a = 1; > double b = 2; > fun(ref a, b); > > What do you think?
I see what you mean, however: ----- swap(ref a, ref b); I think that's overly verbose for a call with very descriptive function name to begin with. ----- Perhaps an IDE can use formatting to show you the ref parameters. ----- The designer of the function can always request pointers, so the caller has to explicitly pass addresses. -- Michiel Helvensteijn