consulo / consulo-csharp

Languages: C#
Apache License 2.0
50 stars 6 forks source link

Escaping for string interpolation #540

Open VISTALL opened 4 years ago

VISTALL commented 4 years ago
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;
    }
}