Skip to main content

Questions tagged [c#]

C# is a multi-paradigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform. Use this tag for questions related to C#. In case a specific version of the framework is used, you could also include that tag; for instance .net-2.0.

3 votes
3 answers
90 views

A Vending Machine Simulator Project

Here is the code: ...
PizzaLvr49's user avatar
3 votes
1 answer
50 views

A Maui App that helps to track your mood

I just got my first .NET MAUI App up and running. I pushed it to my repo at https://codeberg.org/ulrich-jell/MoodDiary It aims to track your overall mood of the day, so you can (more or less) quantify ...
Tripple_U's user avatar
0 votes
0 answers
52 views

Seeking Suggestions for Improving My Program.cs File for a .NET Project

I use this code as reference for when I start working on a new project whether that be for personal or for work. It's worked fine so far, but I'm wondering if anyone can read it and provide any ...
sammy medawar's user avatar
3 votes
1 answer
95 views

Validate Microsoft Entra JWT

I am implementing SSO in my application via Microsoft Entra. It has a client application with Cloud APIs. The Client passes an Entra JWT to the server obtained from the MS Entra libraries. My database ...
Thomas's user avatar
  • 131
7 votes
1 answer
68 views

.net core web API simple app with one endpoint

I am trying to complete a challenge - a simple .net core API with one simple endpoint. This endpoint should validate the user's information and return a unique ID. He should provide: 1) Name, 2) ...
Tania Marinova's user avatar
7 votes
3 answers
1k views

Easter day calculator

Here is a simple Easter day calculator in C#. The results look good for me, but if anyone can check the results. ...
0___________'s user avatar
2 votes
3 answers
2k views

Fibonacci Sequence Generator generates 1 million numbers

A FibonacciSequenceGenerator in C# looking for speed improvements. Currently generates 1 million numbers in 25.6 seconds. We must use BigInteger because the ...
Charles Henington's user avatar
0 votes
1 answer
89 views

2D line-of-sight recalculation code causes lag whenever a door is opened [closed]

My 2D video game recalculates into a cache the line-of-sight from every tile to every other tile and whether that line-of-sight provides clear shot, cover, greater cover or is blocked. Each time a ...
Petr Hudeček's user avatar
0 votes
0 answers
80 views

Custom JSON Model Binder for deserialization with Newtonsoft JSON in ASP.NET MVC 5

I wrote this to have ASP.NET MVC be able to respond as a web API as well as the normal MVC Razor pages. I wanted Newtonsoft deserialization for models based on already parsed values: ...
MPelletier's user avatar
1 vote
0 answers
52 views

Sending mails with Graph/o365 [closed]

In C#, I have always sent mail with MailMessage, but I understand that it has to move to graph. I have never tried to send mails with the Azure Graph API and have just copy/pasted whatever some AI ...
Thomas Koelle's user avatar
7 votes
1 answer
356 views

High performance Thread-safe FIFO accumulator

I am writing some C# code. I want to find a data structure that can implement the following strategy: FIFO data access mode Multiple independent threads add elements to the data structure At a random ...
Aycon's user avatar
  • 225
3 votes
1 answer
172 views

Int128 for handling large numbers bassed off of BigInteger update

An update to Int128 That is built on Linux for lack of direct support, based on System.Numerics Nuget package. ...
Charles Henington's user avatar
3 votes
1 answer
144 views

Abstraction with Ef core (repository)

I am new to entity framework, and I've been working on a project lately that I used clean architecture in and found myself in a bit of hassle. should I introduce further abstraction to the already ...
Lemon juice's user avatar
4 votes
1 answer
101 views

C# railway oriented programming with async support

In my application there are many business workflows. Most of them are quite simple and can be put in one function. A few of them however are very complex and have many business validations, require ...
Parsa99's user avatar
  • 235
4 votes
1 answer
173 views

Int128 for handling large numbers based off of BigInteger

I have created Int128 which is based off of BigInteger with operator overloading to handle larger math requirements. Here is a ...
Charles Henington's user avatar

15 30 50 per page
1
2 3 4 5
664