Is there a way to use something like this:
private const int MaxTextLength = "Text i want to use".Length;
I think it would be more readable and less error prone than using something like:
private const int MaxTextLength = 18;
Are there any ways to have the length of the text be the source for a constant variable?
1 Answer