how i can do it in one line?
Are you of the opinion that you will live longer if you type fewer lines?
The way to "do it in one line" is to break the problem down into many sub-problems, each of which is short. For example, we could solve your problem by extracting these sub-problems:
Quote a string:
static class Extensions
{
public static string Quote(this string s) =>
"\"" + s + "\"";
Quote a sequence of strings:
public static IEnumerable<string> QuoteAll(
this IEnumerable<string> items) =>
items.Select(Quote);
Comma-separate a sequence:
public static string CommaJoin<T>(this IEnumerable<T> items) =>
string.Join(",", items);
Bracket a string:
public static string Bracket(this string s) =>
"[" + s + "]";
}
And now put it together:
string result = list.QuoteAll().CommaJoin().Bracket();
And you're done "in one line". But the important thing is not that every method is one line. The important things are that first, the meaning of the code can be clearly understood by simply reading it, and second now you have four tools you can use for other jobs in your program. This is probably not the only comma-separated list you're going to create.
"[\"" + String.Join("\",\"", list) + "\"]";