I need an array for a method to use to iterate through a string's characters and perform certain operations when one is found or found in certain combinations.
Anyway, to keep things separate and easier to interpret later, I have created an array of characters for the method to iterate through. This is how I have initialized the array:
private char[] CharArray = new char[]
{
char.Parse("+"),
char.Parse("("),
char.Parse(")"),
char.Parse("-"),
char.Parse(" ")
};
the array will always be the same, it shouldn't change unless there is an update to the software. Is this okay to do, or is there a better way to do this than parsing a bunch of strings?