I use readonly string static strings in my web application. Basically the array has error codes, and I saved all the same error codes in one array and checked this array instead of checking each of them in a different constant string.
like
public static readonly string[] myarray = string[] {"232132132","31232132","123123123"}
Please let me know if there is any harm when using readony static string arrays?
Note. I do not encounter any error, wanted to know if there is any harm or performance problem to use like this?
source share