smurthys, to CSharp
@smurthys@hachyderm.io avatar

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

.NET 8: https://dotnetfiddle.net/aAPvYU
.NET 7.0.105: https://sigcpp.godbolt.org/z/3v3Y1Ecbn

Someone, please, set me right. 🥺🙏🏽

khalidabuhakmeh, (edited ) to dotnet
@khalidabuhakmeh@mastodon.social avatar

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 and compared to the DllImport approach. I swear it was a source generator or something.

khalidabuhakmeh, to rust
@khalidabuhakmeh@mastodon.social avatar

What’s neat about is the polyglot nature of it. I'm writing a library that I later consume in a solution, all without switching context.

I can also run my .NET solution and run my tests. That's a nice workflow.

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

I wanted to see where is currently at with support and found there's a lot of nice helpers for a .csproj file. Here is a helper to set the language version.

JetBrains Fleet in .NET Project

davidwengier, to CSharp
@davidwengier@aus.social avatar

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 😀

https://overcast.fm/+BHQDyOH84Y

testdouble, to rubyonrails
@testdouble@mastodon.social avatar

Do you know a top-notch Ruby on Rails or C# developer?

We're hiring subtractors!

💚 Our mission is to improve the way the world builds software. We care about things like testing best practices, maintainability, and scalability.

✨ We're fully remote and looking for subcontractors across the U.S. and Canada.

iw, to CSharp
@iw@hachyderm.io avatar

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.

https://www.isaacwyatt.com/posts/2024-03-30/?utm_source=hachyderm.io&utm_medium=referral&utm_campaign=user_post&utm_content=%40iw

janriemer, to CSharp

Implicit index access in C# 13

https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13#implicit-index-access

Wait...what!? What is this even doing and what is it for?

Urgh... I think I have to stop looking at new language features for some time...

maartenballiauw, to CSharp
@maartenballiauw@mastodon.online avatar

Time to dive into today's topic: Collection Expressions 🥳

In this series by @matkoch86, we take a closer look at the 12 language features and how ReSharper and Rider make it easy to adopt them in your codebase.
https://blog.jetbrains.com/dotnet/2024/03/26/collection-expressions-using-csharp-12-in-rider-and-resharper/?utm_medium=social&utm_source=mastodon&utm_campaign=collection-expressions-using-csharp-12-in-rider-and-resharper

devleader, to dotnet
@devleader@hachyderm.io avatar

I've created a course to take you from zero coding experience through to understanding the basics of writing code in C#.

No previous experience required! And if you know some other languages already, this is still a great opportunity to get into C#.
https://dometrain.com/course/getting-started-csharp?affcode=1115529_nl-teyzg

sonny, to rust
@sonny@floss.social avatar


/

/
#C



Those are languages people use to write / apps, and it's amazing ❤️

khalidabuhakmeh, to godot
@khalidabuhakmeh@mastodon.social avatar

The integration with is pretty awesome when writing your games in . There's a little Godot icon that lets you launch the Godot editor.

khalidabuhakmeh, to godot
@khalidabuhakmeh@mastodon.social avatar

Spent some time changing a to a 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.

C# code

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

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!

mforester, to CSharp
@mforester@rollenspiel.social avatar

I spent the afternoon replacing some 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, to rust
@voltagex@aus.social avatar

Both and make me feel like I am unable to write code, to some degree. I know more Go than Rust but I would like to change that.

I want to reimplement the API.

Which should I choose? I guess is also an option.

mihamarkic,
@mihamarkic@mastodon.social avatar

@voltagex I'd go with 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 , 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 and out there. Both at a similar level to C#.

breakpointshow, to dotnet
@breakpointshow@mastodon.social avatar

🎉 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! 🚀 🎙️

https://tinyurl.com/3hmb7w5e

jolexxa, to gamedev
@jolexxa@mastodon.online avatar

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 with nothing but open source software (i.e., and ). Catch it at https://youtube.com/igdatc

alexzeitler, to rust
@alexzeitler@mastodon.social avatar

Microsoft has released a guide for developers

https://microsoft.github.io/rust-for-dotnet-devs/latest/

cwoodruff, to dotnet
@cwoodruff@mastodon.social avatar

New Blog Post - I am Self-Publishing the Network Programming Book!

https://woodruff.dev/i-am-self-publishing-the-network-programming-book/

danclarke, to dotnet
@danclarke@mstdn.social avatar

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?

vekzdran, to dotnet
@vekzdran@hachyderm.io avatar

Hear me out folks.

If I could ask for one wish from the C# team, it would be naming generic parameters of types eg.

Dictionary<int userId, string username>

List<string username>

How would that make the world much easier...

I don't want to use own types*, yes I know I can do that.

Also, I do not like DDD and I enjoy primitive obsession.

khalidabuhakmeh, to rust
@khalidabuhakmeh@mastodon.social avatar

I learned you can use the break inside a loop to return a value. It feels strange coming to from . I would have expected to use the return keyword, but I guess it makes sense.

By the way, I'm taking the Academy course, so if you want to follow along, check it out.

https://www.jetbrains.com/academy/

sos, to programming
@sos@mastodon.gamedev.place avatar

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

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • thenastyranch
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • cisconetworking
  • slotface
  • vwfavf
  • everett
  • Durango
  • rosin
  • tester
  • GTA5RPClips
  • khanakhh
  • osvaldo12
  • ngwrru68w68
  • normalnudes
  • anitta
  • ethstaker
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • JUstTest
  • All magazines