-1
我在想,我應該是什麼樣的方法使用哪種方法型式應採用
public class UserProfile {
public String GetAsString(){
... Some Stuff
return anyString;
}
// Or this one
public static String GetAsString(UserProfile profile){
... Some Stuff
return anyString;
}
}
是否有任何性能問題,或者什麼,我應該使用這些方法之一?
謝謝你幫我
請在C#中使用正確的駱駝符號GetAsString()。這不是Java。 – marco
檢查此靜態與非靜態答案:http://stackoverflow.com/questions/790281/resharper-complains-when-method-can-be-static-but-isnt – andreasnico
@marco或JavaScript ..... .. –