Is always
keyAttributeValue.StartsWith(STR_ConnectionString, StringComparison.InvariantCultureIgnoreCase)
but it will not work as good as what you have. If you need to do this thousands of times per second, stick to what you have. If not, just be case insensitive.
Also consider
keyAttributeValue.StartsWith(STR_ConnectionString, StringComparison.OrdinalIgnoreCase)
which is faster and probably you still want.
source share