I have written C# top-level code before, but I'm obviously suffering a "brain freeze" right now: Why does this simple top-level C# statement say "The name 'Console' does not exist in this context", even though I'm compiling with .NET 7.x and .NET 8 (well past .NET 5 that top-level statements need)? 😳
Console.WriteLine("hello world"); //System.Console works
Update: It's LibraryImport. Check out the updated screenshot. It's much nicer because it cycles through extensions and allows for custom marshalling of types (not seen in example).
Maybe I’m hallucinating this, but wasn’t there recently a newer option to import functionality in #dotnet and #csharp compared to the DllImport approach. I swear it was a source generator or something.
What’s neat about #JetBrains#Fleet is the polyglot nature of it. I'm writing a #rustlang library that I later consume in a #dotnet#csharp solution, all without switching context.
I can also run my .NET solution and run my #rustlang tests. That's a nice workflow.
I wanted to see where #JetBrains#Fleet is currently at with #dotnet support and found there's a lot of nice helpers for a #csharp .csproj file. Here is a helper to set the language version.
I love talking about C#, so I listen to every podcast episode Mads is on so I can pretend I’m having a conversation with him. Helps that I like listening to people talk about C# just as much 😀
Early in my career as a marketing analyst I wrote a C# script, and then a desktop app, to compare and clean email lists from vendors using MD5 hashes - and I gave it away for free despite there being a small business opportunity.
The #JetBrainsRider integration with #GodotEngine is pretty awesome when writing your games in #csharp. There's a little Godot icon that lets you launch the Godot editor.
Spent some time changing a #GodotEngine#GDScript to a #csharp class. They look identical, but it seems the same hardcoded values work differently in GDScript vs. C#.
Does anyone want to have a look? I can't see what I did differently.
FIGURED IT OUT! I forgot to add up the gravity. The “+=“ is possible in GDScript, but Vector2 is a record type in C#, so you can’t apply the +=. In the language conversion, I glossed over that. Doh! #godotengine#csharp
I spent the afternoon replacing some #csharp code with functional code from the language extensions library.
My brain hurts and it took me much longer than expected, but I already discovered a few obvious bugs. Can't wait to do more with it. 🤩
I'd like to think that I'm pretty good with LINW, but language-ext is on a whole new level. I've worked with it before, but haven't seen it in a few years and I feel like I've forgotten everything. 😅
@voltagex I'd go with #csharp which should be the most productive of the three. I'm biased though, working with it since it's beta. The next option would be #rust, but as mentioned, it has a steep learning curve and not everything is in place yet (async is quite volatile from what I read). But hey, there are also #swift and #kotlin out there. Both at a similar level to C#.
🎉 Get ready for a legendary showdown on "The Breakpoint Show" podcast! Join us with special guest @markrendle as we discuss the 1 Billion Row Challenge and dive into the wild world of .NET and C# performance! 🚀 #dotnet#csharp#performance 🎙️
Tonight at 6:30 CST, I'll be speaking at the local chapter of the International Game Developer's Association (IGDA) about how our work at Very Good Ventures inspired tools to enable scalable, enjoyable #gamedev with nothing but open source software (i.e., #godot and #csharp). Catch it at https://youtube.com/igdatc
Just been banging my head against a wall trying to work out why an injected dependency was coming through as null in a WebApplicationFactory test.
Turned out it was because I was doing the injection via a primary constructor, and switching to a normal constructor fix it! I assumed primary constructors were just syntax sugar - so this is surprisingly unexpected.
Anyone know why primary constructors would behave differently for DI? #dotnet#csharp
I learned you can use the break inside a loop to return a value. It feels strange coming to #Rust from #csharp. I would have expected to use the return keyword, but I guess it makes sense.
By the way, I'm taking the #JetBrains Academy course, so if you want to follow along, check it out.
Out of 6 languages recommended by the NSA, 4 are patended bvy multibillion comanies who can pull the plug on them at any time (and Oracle already tried that).
C# - PATENTED by Microsoft,
Go - PATENTED by Google
Java - PATENTED by Oracle, NOT FREE
Python - not too shabby
Rust - not too shabby
Swift - PATENTED by Apple