C#

C

C#

We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.

Join

SVG Icon in a wpf App

Hi, I found SharpVectors and I wanted to know what is the best way to use SVG files for icons in a WPF app. The current solution I went through was to save all the uriSource in a ResourceDictionary and then use it that way: <svgc:SvgIcon UriSource="{StaticResource IconSettingsPath}" />...

WPF Video Editor program | Help with the (Timeline/TimeMarks)

Hi there! I am in need of help making the timeline and time marks for my program. I personally tend to struggle when it comes to math(dyscalculia hates me) so the concept of this is really not clicking for me!...

✅ *"Converting possible null value to non nullable type"* warning in `Console.ReadLine()`

Can I ignore "Converting possible null value to non nullable type" warning here:
string s = Console.ReadLine();
string s = Console.ReadLine();
...
No description

Guide or Reference for Quality UX With CLI Applications

Are there any good references or guides on designing CLI command structures for high quality UX and ergonomics? Like when to use arguments, when to use options, how to expose a choice as an option, etc.

✅ LEARN C# in 2025

hi this might ve been asked 300 times. i already have a experience with prog languages, no idea about csharp or anything like it where should i begin, but to note my goals are Unity GameDev and .NET industry (lacking a cs degree)...

✅ I need a help I had 10 years experience in C# and .Net , Entity Framework, WPF

I need a help I had 10 years experience in C# and .Net but I dont had knowledge or courage to switch to another company since I dont had knowledge from scratch. I can work any modules or function if they explain but I cant built from scratch so Im requesting everyone here to help me to gain insights and knowlede and advise me or give me roadmap so that I can achieve my dreams. Please help...

✅ Acrylic

Does anybody knows how to make my winform form background acrylic blurry transparent effect

✅ Serilog Confusion

Trying to implement Pope's code and I'm messing it up 😦 https://paste.mod.gg/yywrpkzeacxd/1 @Pope I'm trying but getting confused. 😐...

✅ Bubbel sorting

I need to do a bubble sort after given instructions, i understand nothing. Could someone help me where i can find good informative information on bubble sort, the book i have dosent really go over bubble sort that well.

✅ Relation Does not Exist when running Tests

Hi, trusting y'all are well. So I am runnin into this issue where my XUnit tests using a Postgres Test Container fail with the error message
Npgsql.PostgresException : 42P01: relation "Accidents" does not exist
Npgsql.PostgresException : 42P01: relation "Accidents" does not exist
. I have an extension method
Apply Migrations
Apply Migrations
that should run the migrations when the container starts. I'd appreciate your aid, thanks!
No description

Saving Messages withj SignalR

Hi guys Im Creating a webApp for creating groups something like discord and skool.For now i have the basic home page Creat Group and visualzing the group to some degree(Im dump and made the frontend first).I use SignalR the chat system and have TextChannel and Message models in the Db.I want to save the messages and display them.How can i do that with the SignalR. Here is the repo https://github.com/MiroslavPetrovv/GroupApp

SignalR : Websocket connected twice on connection.

Hello, On my current project (frontend : ReactJS / backend : .NET 9) when I successfully connect to my SignalR hub, it connects twice, as shown per the screenshot. I can't find any clue on the internet of why this is happening. Does someone knows how to solve this ? Thanks....
No description

Resource to learn making GUI in C#

Hello guys, is there any recommended resource to start making GUI from scratch in C# please

✅ How to convert controller route name to camel case automatically?

I have this: ``` [Authorize] [Route("[controller]")] public class StreamController ...

Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.

Good morning, I’m sorry to disturb you but I have a slight problem with my code. Here, when I try to run my code, I get the following message. However, I have no idea what I need to correct; I tried several things, in doubt, I checked well if I converted everything from "string" to "int", but nothing to do, I still have the same error. I would very much like to have some help so that we can fix this. Thank you in advance....

Can't access a function inside a class library

I'm trying to make a class library but I can't seem to access the function inside of it. Here's the library: ```c# using DSharpPlus; using DSharpPlus.Entities;...

how do I send data back and forth

I am new to c# and im using .net and I need help sending data back and forth.

Visual Studio 2022 (0xc0000409) Error Code

As usual, I was doing my coding and creating my program. However, although there were no errors when I debugged, whenever I tried to open my program, it did not open with the error code (0xc0000409).

Versioned API client architecture

Unfortunately the IPC implementation I made a post about a while back was completely useless as there is no IL2CPP API to get a class' static field data. So now I'm falling back to manual memory interop. For this, I need to handle many different versions of both Mono and IL2CPP. I need to expose methods such as these; ```cs nint GetMonoImage(string name);...

Cannot return null from an action method with a return type of 'Microsoft.AspNetCore.Mvc.JsonResult'

Context: I created a simple app which displays card view items on view. I have added a file picker in there. Once the file picker selected an image and the save button has been clicked, my code triggered the exception System.InvalidOperationException: Cannot return null from an action method with a return type of 'Microsoft.AspNetCore.Mvc.JsonResult'. My Rider does not let me debug like this (as per attached screenshot) so I have no idea what caused this exception. ...
No description