المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Paranoid Question of the Day



C# Programming
06-27-2013, 06:52 PM
public void Foo(Bar bar){ if (bar== null) { bar = new Bar(); } //Do something with bar;}
--- or ---

public void Foo(Bar bar){ bar = bar ? new Bar(); //Do something with bar;}
Which do you think is better?
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed”
“One of the greatest problems of our time is that many are schooled but few are educated”

Sir Thomas More (1478 – 1535)