We store ContentDelimiter config (which we use to delimite the content) in Database as string (which could be "tab", i.e. \t , or new line \r\n)
Later on we would like to use this config, how would I go about converting \t
(which is string, not chat) to tab char ?
Example:
string delimiterConfig = config.GetDelimiter();
char[] delimiter = ConvertConfig(delimiterConfig);
How would ConvertConfig will look like so that it will parse all escaped strings back into chars so that "\t" string will become \t
char.
Any elegant solutions without using case statements and replace ?