これは以前にも尋ねられたと思いますが、この例では、定数をこの程度に分離することで他の人がどのような有用性を確認できるかについて興味があります。
public class CoreStringConstants
{
// Common strings
public const string SPACE = " ";
public const string PERIOD = ".";
public const string COMMA = ",";
public const string COLON = ":";
public const string SEMI_COLON = ";";
public const string HYPHEN = "-";
public const string UNDER_SCORE = "_";
public const string LEFT_BRACKET = "(";
public const string RIGHT_BRACKET = ")";
public const string LEFT_SQUARE_BRACKET = "[";
public const string RIGHT_SQUARE_BRACKET = "]";
public const string LEFT_CURLY_BRACKET = "{";
public const string RIGHT_CURLY_BRACKET = "}";
public const string PIPE = "|";
public const string CIRCUMFLEX = "^";
public const string ASTERISK = "*";
... 本当?
これらの種類の文字列定数をコードから分離する利点は本当にありますか?
ASTERISK で使用される文字は、アプリケーションの予測可能な寿命の中でいつ変更されますか?