Explore tweets tagged as #StringSyntax
@KarenPayneMVP
Karen Payne MVP
27 days
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
@STeplyakov
Sergiy Teplyakov 🇺🇦 🇺🇸
1 year
StringSyntax attribute with raw string literals are super useful for writing readable tests!
2
6
50
@Dave_DotNet
Dave Callan | dotnet
2 years
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
@chucker
Ei ssörrender
3 years
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
@ikorin24
いこり
2 years
Riderだと文字列補間ありraw stringなJSON文字列で、補間とJSONの両方を考慮したシンタックスハイライトついてくれるっぽいんだけどこれVSではできないのかな? VSだとStringSyntax属性使っても文字列補間ありだとJSONのハイライト消えちゃう
0
0
1
@rogue_code
Arild Fines
3 years
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
@Dave_DotNet
Dave Callan | dotnet
1 year
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
@pranavnegandhi
Pranav N.
3 years
.NET 7 introduces the new StringSyntax feature, that lets your IDE provide syntax highlighting even in plain-text snippets. How cool is that! #Dotnet #csharp
0
1
1
@Dave_DotNet
Dave Callan | dotnet
8 months
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
@KarenPayneMVP
Karen Payne MVP
1 year
@Dave_DotNet Have only played with StringSyntax attribute. When an appropriate usage comes up I will use them, not before.
0
0
4
@Philco78
Phil Scott
3 years
Huh. Looks like @JetBrainsRider needs a kick in the pants with a locally used attribute to start using StringSyntax highlighting.
3
0
1
@MahodarM
Mahodar Majgaonkar
2 years
📜 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
@KarenPayneMVP
Karen Payne MVP
1 year
@DevLeaderCa Perfect example where a developer uses [StringSyntax(StringSyntaxAttribute.CompositeFormat)] Which is overkill in this case.
0
0
1
@resharper
JetBrains ReSharper
3 years
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
@resharper
JetBrains ReSharper
3 years
🎆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
@akarpov89
Andrei Karpov
6 months
@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
@fonssonnemans
Fons Sonnemans 🇳🇱 💙💛
3 years
@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
@markjprice
Mark J Price
3 years
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
@InfoQ
InfoQ
3 years
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