从概念上讲,当方法只接受输入并将输入重新格式化为输出时,使用静态方法(C#)是否合适?例如:
public static string FormatString(string inputString){ return "some formatting" + inputString + "Some other formatting"; }
如果我有一些这样的方法,静态"实用"类是一个好主意吗?
c# oop static static-methods
c# ×1
oop ×1
static ×1
static-methods ×1