This must work and it is a more elegant solution:
string name = "ABC"; lineSeries.YBindingPath = string.Format("\"PropertyBag[\"{0}\"]\"", name); You escaped the quote before and after name, in doing that you didn't specify where the first part of the string ends and where the second one starts. To avoid errors like that it is better to use the Format method. It makes code easier to read and maintain.
The following solution:
string.Format(@"""PropertyBag[""{0}""]""", name) is good too, but I think the first one is more readable. I personally like more the first one. But it is up to you, just avoid concatenation; in modern programming it is deprecated especially when the language has more efficient and powerful tools to do the job.
**** UPDATE ****
If you use the most recent versions of .NET you can also use an even more elegant solution, through string interpolation (aslike in Kotlin and Swift):
string name = "ABC"; lineSeries.YBindingPath = $"\"PropertyBag[\"{name}\"]\"";