I’ve been looking for something like p5 but for c# since I like it a ton. I just need a simple graphics library that I can make small test projects and games. I’ve tried Visual Studio and their graphics library but it’s not quite what I’m looking for. Any ideas?
SkiaSharp?

Unfortunately you’re comparing two very different languages and expecting a common library, p5.js works because you can render a canvas on the client side, c# on the other hand is essentially just a systems language with frameworks built on top.

You could use a game engine, or look into using opengl but you won’t find a way to easily “draw” things from c#.

Well, not really. p5.js is a JavaScript implementation of Processing, which is written in Java. Processing is more of a programming environment than a library (as is p5.js, just it’s so than Processing). There are examples of this style of programming using C#. LINQPad comes to mind. While it’s not used for graphics, it is a programming “environment” that uses C# (as well as F# and SQL) in the same spirit that Processing uses Java.

Monogame. It’s essentially just a library that provides a game loop and way of drawing textures and other helpful things. It probably doesn’t have as many bells and whistles as p5. I see someone mention xna. Monogame is the modern version of xna and is still fully supported. I highly recommend.

There nothing as simple as p5.js. The reason being is html and canvas give you all the graphics primitives you would need to implement that kind of library. With C#, you’d need to create a program that sets up that kind of environment using OpenGL, or something. That program would then read in your program, verify it, and execute it in a safe way (in some kind of sandbox). This doesn’t appear to exist.

Like others have said, you could try Unity but it is geared towards creating games and is not as simple as p5.js. There’s also Processing. P5.js is a JavaScript implementation of Processing. It uses Java, not C#, but they are similar languages.

You can do efficient or complex rendering on desktop applications using opengl/directx
Simple graphics libraries include sdl and sfml

It is very different, but Unity is probably what you are looking for if you need something that gives you a graphics library for easily making test projects and games in C#.

If you want something much more barebones (essentially just a wrapper over Direct3D), than XNA is probably what you are looking for (though I don’t think is is supported still).

Finally, if you want a great framework for building generative visuals that is node based (but also allows C# coding) vvvv is pretty rad. Windows only but it is super fun for whipping up graphics demos quickly (particularly if you know your way around shader coding).

source