ref vs. out keyword
-
What are the differences, if any? Thanks, Yaakov
-
What are the differences, if any? Thanks, Yaakov
-
Thanks a lot. Actually, I've read rhe docs before, but I didn't notice this difference. Yaakov.
-
Thanks a lot. Actually, I've read rhe docs before, but I didn't notice this difference. Yaakov.
int a,b,c,d,e,f,g = foo(out a, out b, out c, out d, out e, out f);
vs
int a,b,c,d,e,f;
a=b=c=d=e=f=0;
int g = foo(ref a, ref b, ref c, ref d, ref e, ref f);so, about 2 lines :-> top secret
Download xacc-ide 0.0.3 now!
See some screenshots -
int a,b,c,d,e,f,g = foo(out a, out b, out c, out d, out e, out f);
vs
int a,b,c,d,e,f;
a=b=c=d=e=f=0;
int g = foo(ref a, ref b, ref c, ref d, ref e, ref f);so, about 2 lines :-> top secret
Download xacc-ide 0.0.3 now!
See some screenshots:rolleyes:
-
int a,b,c,d,e,f,g = foo(out a, out b, out c, out d, out e, out f);
vs
int a,b,c,d,e,f;
a=b=c=d=e=f=0;
int g = foo(ref a, ref b, ref c, ref d, ref e, ref f);so, about 2 lines :-> top secret
Download xacc-ide 0.0.3 now!
See some screenshotsNice! I didnt know that one. But I wonder if it is good style to declare more than one variable on one line. Most coding styles would forbid it.