Dariusz G. Jagielski
Dariusz G. Jagielski

Reputation: 665

"@" inside a string?

Now, I know what @ operator is for - it allows to use reserved word as variable name or make non-escaping string, but recently I've received codebase which contain this (names changed and parts of string as I'm under NDA):

somestring = @"This is good thing that @nametag is there";

Obviously it seems to be some kind of placeholder, but what it exactly does?

Upvotes: 0

Views: 96

Answers (1)

Max
Max

Reputation: 1150

Likely a placeholder to be replaced at runtime

For example:

Dear @CustomerName,

Join the first ever event in @City at @Time on @Date

...

Upvotes: 3

Related Questions