I bet you #dotnet folks didn’t know that raw string literals could have any number of double quotes. As long as the starting number matches the ending number, you have a valid raw literal string.
Has anyone had issues running v7 of core .NET libraries like System.Text.Json on .NET 6? This isn't the first time I've seen someone mention similar on an issue before but wondering if this is something we're meant to avoid.
What I find weird about it is that my example with S.T.J v7 does target .NET 6 so I don't see why it is a problem?
@efonsecabcr my use case is wrapping a #JavaScript library for #blazor. Sometimes I need to pass an html string to a JS function, without actually rendering it from #dotnet. It also means razor becomes an easy templating language for things like email html templates.
Well! I have to say, kudos to the #winrt projection team from microsoft and #dotnet using the winrt api from both #fsharp and #rust is nearly the same
In this case I'm just using the Windows.Security.Cryptography.DataProtection namespace to read a file using the winrt api (I could use bcl/std apis I know) convert it into a stream, use the DataProtection apis to encrypt the file, the encrypted file gets saved as a new file (so I can see it rather than just do it to the same file) and then decrypt that file into a new one which technically is just a copy of the first one but after encryption/decryption :)
So a couple years late, I have entered the new era of @dotnet development. I got one of my .NET 7 console apps running under #Linux last night. Natively, mind; not just via WINE.
I built it for Ubuntu 22.04 using the #dotnet command line tools on my Windows machine. It doesn't produce an exe, it produces a native Linux executable (extensionless, because as you may know, Linux doesn't actually use file extensions for anything important), which I uploaded to my server using SFTP, gave execute permissions to, and ran it. So proper native Linux.
And it... just worked. I'm so impressed! 😲
I've been coding professionally for 25 years now, and this is probably the coolest thing I've ever seen.
In retrospect, switching from Java to C#+.NET was a great decision on my end. I've learned in 4 months in .NET more than in 18 months of Java. ASP.NET Core blows Spring out of the water both in performance and developer experience.
EF Core is just brilliant, being able to get only the records I want to query without writing SQL or that weird-ass thingy called JPQL.
Desktop still feels kinda weak but Avalonia isn't bad once you get used to it.
In this article, we look at how the existing error-handling implementation for JSInterop is made in Blazor. We then look at how we can map the error types defined in the standard WebIDL specification to C# exceptions, and in the end, we show some examples of how to use this in practice when making JS invocations.
In this blog post, @khalidabuhakmeh explains how to re-use (and share) commonly used snippets with your team, how to add parameters and placeholders, and more.