In some programming languages all strings have an @ prefix i.e. var foo = @”this is a test”;
If a string does not have an @ prefix does the .NET framework have to do extra work? Is there any scanning that has to be done? I’m curious of we should be using @ on all strings possible?
Using verbatim strings may or may not be faster by an amount which you likely won’t even be able to measure by feeding the compiler specially crafted programs. In any case this processing happens at compile time, which makes all of the associated work “free”. So from that point of view there’s absolutely no argument either for or against verbatim strings.
That said, I have seen development tools consider non-verbatim strings as candidates for localization — in which case using a verbatim string where appropriate does have some value.