consulo-csharp icon indicating copy to clipboard operation
consulo-csharp copied to clipboard

Escaping for string interpolation

Open VISTALL opened this issue 6 years ago • 0 comments

using System;

class Example {
    static void Main() {
        int b = 1;
        string str = $"test {{";
        Console.WriteLine(str);


        str = $"test }}";
        Console.WriteLine(str);


        str = $"test {{}}";
        Console.WriteLine(str);
    }

    private static String c(String str) {
        return str;
    }
}

VISTALL avatar Oct 09 '19 12:10 VISTALL