Explore tweets tagged as #StringSyntax
C# StringSyntax provides format syntax passed to a method rather than hard-coding formatting. Do you use this? https://t.co/BqtTwnPA2c
9
7
94
StringSyntax attribute with raw string literals are super useful for writing readable tests!
2
6
50
StringSyntax attribute example 💡 The StringSyntax Attribute (.NET 7+) allows us to tell Visual Studio what kind of string (e.g. regex, datetime format, JSON etc.) we are working with in order to get correct intellisense and highlighting. Have you used it yet? #dotnet
10
30
200
There’s also some level of inline support, though I’m not sure if the //lang= syntax will eventually get deprecated in favor of the [StringSyntax] attribute.
0
0
1
Riderだと文字列補間ありraw stringなJSON文字列で、補間とJSONの両方を考慮したシンタックスハイライトついてくれるっぽいんだけどこれVSではできないのかな? VSだとStringSyntax属性使っても文字列補間ありだとJSONのハイライト消えちゃう
0
0
1
The new StringSyntax attribute in .NET 7 is pretty neat, especially combined with the raw string literal syntax. Obviously you can't use it on a local variable, but you can work around that with a simple local function
1
0
2
StringSyntax attribute example 💡 #dotnet The StringSyntax Attribute (.NET 7+) allows us to tell Visual Studio what kind of string (e.g. regex, datetime format, JSON etc.) we are working with in order to get correct intellisense and highlighting. Have you used it yet?
12
38
167
Consider using the StringSyntax attribute to give semantic meaning to your .NET 7+ strings 💡 The StringSyntax Attribute was new in #dotnet 7 and allows us to tell Visual Studio what kind of string (e.g. regex, datetime, JSON etc.) we are working with in order to get correct
6
16
112
@Dave_DotNet Have only played with StringSyntax attribute. When an appropriate usage comes up I will use them, not before.
0
0
4
Huh. Looks like @JetBrainsRider needs a kick in the pants with a locally used attribute to start using StringSyntax highlighting.
3
0
1
📜 Part 1: The Tale of Two Syntaxes! Witness the evolution from outdated string concatenation to the modern magic of template literals. 📜🔮 #javascript #String #code #es6 #StringSyntax #JSModernMagic #TemplateLiterals
1
0
0
@DevLeaderCa Perfect example where a developer uses [StringSyntax(StringSyntaxAttribute.CompositeFormat)] Which is overkill in this case.
0
0
1
The ReSharper 2022.3 EAP just launched! The first build contains: ⚒️ Language injections for C# 11 raw string literals ⚙️ Support for the [StringSyntax] attribute from .NET 7 🔥 Extended support for C++ ✨ Unreal Engine improvements Learn more here: https://t.co/vzLj17EZd5
0
2
10
🎆Language injections now work inside C# 11 raw string literals. 🎆ReSharper supports the [StringSyntax] attribute from .NET 7, along with its different syntaxes for language injection and code completion. Learn more: https://t.co/wxVwMZn0CX
#dotnet #csharp
0
2
18
@oising @CordasFilip @jetbrains @JetBrainsRider You can actually just annotate the parameter with `[StringSyntax("PowerShell")]` and if the PowerShell plugin is installed you'll get the language injection
2
0
3
@JaggerJo1 @isaac_abraham @ijrussell @tforkmann @JetBrainsRider Damn… you’re right. We don’t have language injections for F# strings. Hopefully soon. I was also trying with the new StringSyntax attribute, hoping I could get it working but to no avail.
1
0
2
@collinalpert @VisualStudio @buhakmeh Thanks. The StringSyntax attribute in .NET 7 is really great. I hope @VisualStudio will colorize and validate the Xml and Date/Time/Number formats too. #dotnet #dotnet7 #csharp #csharp11
0
1
1
New in .NET 7! [StringSyntax] attribute activates IntelliSense to help you write correct regular expressions and date/time formats and other strings. Learn more in the new edition of my book: https://t.co/5h3fKYW6wh
#dotnet #dotnet7 @PacktPublishing
0
1
2
As part of #dotnet7, developers can tag strings using the StringSyntax attribute. These tags inform tools such as #VisualStudio as to the nature of the string. More on #InfoQ: https://t.co/ONubmUkFD6
#dotnet #SoftwareDevelopment
0
1
4