eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

196
active users

#csharp

7 posts6 participants0 posts today

Personal programming project: reading/writing the MIDI 2.0 file format in C#/.NET.

I have no important reason to do this, but it makes my little geek heart flutter!

Once I make some progress, I'll probably make this my first big open-source project...

#Music#MIDI#Midi2

Tip 90 of #TuesdayCodingTips - Is enum value defined?

In both C++ and C#, enums are mere named numerical constants. Even if they appear to be distinct types, and switch statements can check whether you covered all names within an enum, that's simply not enough.

Anybody can take a random number and cast it to the enum's type, effectively crafting something that appears legit, but may fall through non-defaulted switch statements. While in C++ you don't have a foolproof defense against this (perhaps with C++26 reflection, we will), in C# you can easily check enum validity with `Enum.IsDefined` method.

It simply checks whether the current value of an enum has a name associated with it and if yes, it returns true. This is great, especially for the cases where values associated with underlying names aren't always incremented by one.

Looking for a new work place starting in 2026Q1.
Remote and/or near #Hannover / #Braunschweig

Senior Software Developer, primarily in #Java / #Kotlin but I know a few other langs from #CPP, #Batch, #AndroidDev to #CSharp and I'm experienced enough to know programming is about communcating with fellow humans and every other computer thing can be learned shortly.
I can't stress how unimportant the lang is.

Queer, CCC, degree of disability
:BoostOK: :BoostOK: :BoostOK:, Thanks!
#fedihired #hireme