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.

4 votes
2 answers
665 views

This simple class allows us to hide a byte[] inside the Scan0 of a Bitmap's ...
Short Int's user avatar
  • 762
5 votes
1 answer
190 views

A simple random password generator in C#. Looking for any improvements around speed or design. Any char[] can be passed to choose random chars from. The array I ...
Short Int's user avatar
  • 762
4 votes
1 answer
368 views

I wanted to check my system design and/or object oriented design skills. I started with this Tic Tac Toe WinForms Desktop program. The user couldn't input characters other than O , X . Both players of ...
Siva Sankaran's user avatar
3 votes
1 answer
143 views

This is an update to my Simple Random Password Generator. It has been renamed to SecurePasswordGenerator and uses ...
Short Int's user avatar
  • 762
4 votes
1 answer
187 views

I have a C# class with a number of properties that are read by and set by multiple threads. I use a simple lock when getting and setting them in order to have a full-fence memory barrier, so member ...
Joe's user avatar
  • 140
2 votes
1 answer
80 views

I've written a C# API using .NET 9 with the goal of managing a personal investment portfolio – that means, adding funds adding or removing transactions (for ETFs, ETCs, and usual funds) retrieving ...
Daniel's user avatar
  • 353
0 votes
3 answers
222 views

I implemented quick sort after merge sort as part of LeetCode question for sorting an array. The solution code can be found at https://leetcode.com/problems/sort-an-array/solutions/7180269/i-...
Dovud Jo'rayev's user avatar
8 votes
2 answers
1k views

I have a class that manages an HttpClient to make API requests to a third party service. The service requires being logged in to make requests. When logged in, a ...
yasar's user avatar
  • 1,597
0 votes
0 answers
105 views

I've been banging my head against the AI for a Hnefatafl game I'm making (pronounced NEF-a-taf-full, otherwise known as Tablut) for quite a while now. It's caused me no end of frustration, though I ...
ModiMagnus's user avatar
4 votes
3 answers
153 views

I've created a generic lock class with a timeout and EventHandlers. I'm asking here for any improvements in performance or ...
Short Int's user avatar
  • 762
7 votes
1 answer
134 views

I'm making a game with a system inspired by the PSP Game Dungeon Dungeon maker 2 the hidden war: Visual Reference. I have everything set up but I feel there are ways to make the code more simple and ...
Jereco Merash's user avatar
4 votes
1 answer
117 views

The task is to make a simple LockProvider that will lock a thread by identifier. Basic requirements: Simple call via using block. Support for CancelationToken to get out of waiting without exceptions....
sDima's user avatar
  • 889
2 votes
1 answer
160 views

I am developing a Blazor web app using C# .NET 9 in Visual Studio Code. I am using SQL Server 2017. This project is intended for internal company use. In the ...
DevQt's user avatar
  • 157
7 votes
3 answers
1k views

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

A FibonacciSequenceGenerator in C# looking for speed improvements. Currently generates 1 million numbers in 25.6 seconds. We must use BigInteger because the ...
Short Int's user avatar
  • 762

15 30 50 per page
1
2 3 4 5
665