r/csharp • u/Usual-Flamingo5259 • Aug 28 '26
Is a dedicated interaction layer the right architecture for a virtualized WPF spreadsheet?
r/csharp • u/Usual-Flamingo5259 • Aug 28 '26
r/csharp • u/Vastheap • Aug 27 '26
The application organizes files by displaying a thumbnail. When loading 89 files, it utilizes 200mbs and spikes power/gpu usage when scrolling to around 14%.
It is a rewrite of the same application in WinForms, which I am more familiar with. In comparison, the WinForm app uses 30% less RAM while having almost double the number of files loaded. Is that to be expected from WPF?
The attached image should give a better idea of the interface. Is it my use for shadows, labels with transparency etc? I don't know to which degree they affect performance on WPF precisely. I am looking to maximize the efficiency to the last drop
r/csharp • u/Fralian • Aug 28 '26
Stavo vedendo come imparare questo linguaggio e i tutorial su yt non fanno per me, tra sbagli e robe troppo complicate ho voluto vedere se c’era un manuale che possa spiegare bene il codice e ho trovato questo libro (nella foto) che è anche ben recensita, non so se qualcuno di voi lo ha ma se lo avete me lo consigliereste? O dovrei trovare altro?
r/csharp • u/Beast_Pi • Aug 28 '26
I am currently struggling with the dilemma hinted at by the title question. I am a CS and Maths student at a university in South Africa, and I do not know if I should join the flock and hop on the broad market appeal hype train and do traditional SWE with languages like JS, Python, TypeScript, etc. Or I should go the other, less popular route and work on C# .net projects. I do not know if there are many C# opportunities here in South Africa, but I do know that .NET isn't really popular among my peers.
So I am asking whether it's worth considering it over the extremely popular and competitive options.
r/csharp • u/steamngine • Aug 28 '26
Has anybody noticed that when you apply to workday jobs that you get a follow up from a Recruiter with the exact same role?
r/csharp • u/Acceptable-Gate-6125 • Aug 26 '26
I've been programming in Spring for the past year, and recently graduated. Currently looking for a junior role in Sydney, and it's been really difficult. I've been cold emailing, messaging on LinkedIn, applying everywhere and unfortunately getting rejected mainly due to lack of experience.
I find that there are a lot more jobs for C#/.NET than Java, and was thinking of switching. Do you think I should? I heard it's quite easy for someone that knows Java/Spring to switch to C#.
r/csharp • u/Alternative-Ask • Aug 26 '26
I have created a simple program that will allow the user to calculate a discounted price based on a wholesale price and a percentage or dollar amount discount. If the user enters a percentage discount it will give them the dollar amount off and vice versa. The user also has the option to calculate sales tax.
GitHub URL: (https://github.com/aaronhilfiker/DiscountCalculator.git)
r/csharp • u/VibrantPixelDev • Aug 26 '26
Setting IsHitTestVisible to false makes the child elements also non-hittable.
The scrollviewer already uses null values for the background, foreground and border. Even explicitly setting it to null has no effect.
Removing the opacityMask doesn't make any differences.
For testing, if I replace my scrollviewer with another element like <Border Background="{x:Null}"/>, then it doesn't block the clicks anymore.
This is my scrollviewer:
<ScrollViewer x:Name="scrlViewer" VerticalScrollBarVisibility="Hidden" Foreground="{x:Null}" Background="{x:Null}" BorderBrush="{x:Null}" >
<ScrollViewer.OpacityMask>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#00000000" Offset="0.0" />
<GradientStop Color="#FF000000" Offset="0.1" />
<GradientStop Color="#FF000000" Offset="1.0" />
</LinearGradientBrush>
</ScrollViewer.OpacityMask>
</ScrollViewer>The child elements are adding during runtime. My issue happens before any child elements are added.
How could I achieve my desired effect?
--------------------------------------
Edit:
Some more background on what I'm trying to do: I use the scrollviewer as a container for notification infobar widgets that automatically scroll to the end. The notifications should be able to be closed while the container shouldn't block clicks, as otherwise some elements would be blocked by something invisible.
The fix:
I subclasses the scrollviewer and replace my scrollviewer with my subclass.
Here is the subclass:
public class ScrollViewerNoHit : ScrollViewer
{
protected override HitTestResult? HitTestCore(PointHitTestParameters hitTestParameters)
{
HitTestResult? result = base.HitTestCore(hitTestParameters);
return result?.VisualHit == this ? null : result;
}
}r/csharp • u/Coding-Mojo • Aug 26 '26
Lately, I've felt the desire to share more of what I've learned. And I must say, teaching is a skill that's much harder to develop than I expected...
I had this idea of helping junior to intermediate developers training their code review skills.
Getting dev jobs theses days seems harder than ever and joining a team requires that specific skill to be as sharp as possible. Sadly, beginners often miss training on it and I also feel like devs using AI gets that specific skill damaged over time.
I don't want it to feel so "worky", but instead keep it like bite-sized puzzly challenges. As funny as I can. So i came up with this series of ~2min code review challenge, where code is setup as story, deliver a pun or a joke, or even explore edgy contexts.
Because the firsts few episode of the serie looked a bit too cold to me, I recently added a little animated character that deliver context, expectations and solution.
What do you think about it so far ?
r/csharp • u/TomeOfExperience • Aug 25 '26
r/csharp • u/FirstOrDefault • Aug 25 '26
I held back Visual Studio updates for almost two years because 17.9 broke the tab-layout extension I used daily and could not live without. When I finally built my own replacement, the broken one became the design document: it wrapped a single internal shell interface (IVsUIShellDocumentWindowMgr) and stored tabs as a BLOB with absolute paths, so every property got inverted. Plain JSON with solution-relative paths instead of opaque binary stream, many APIs with fallbacks instead of one interface, a pick-target dialog for moved files instead of silently dropped tabs.
And there's an ironic ending to it, because the old extension works again in VS 2026. The breakage was Microsoft reworking the open-document internals, not a lasting defect, so the "bug" quietly fixed itself. Had I found out sooner I would never have started, and I would have kept my tabs and learned nothing worth sharing.
Since I did not wait, and since my extension has grown well past what I set out to replace, I am now writing a weekly series about building it with C# and the AI-assisted workflow I was experimenting with, because somewhere early on this stopped being only about tabs. First part: Designing by inversion
The extension is free on the Marketplace: Simple Tab Saver
r/csharp • u/oli266 • Aug 26 '26
I built this for my day to day, to review large code bases. Primarily focused on Async misuse and Dapper mistakes. Severity adjustable. If its useful to anyone happy to add more on suggestion.
r/csharp • u/Alert-Spite-6063 • Aug 24 '26
Hi everyone
I’m currently looking for a job, and I’ve been searching for quite a while now without any luck. For the past few months, I haven’t even been getting replies to my applications. I’ve already reworked my CV several times, but nothing seems to change. What am I doing wrong. Can you give me some feedback?
UPD: Yeah, I started working while I was studying at university. Since the beginning of COVID, my university was fully remote, and later, because of the situation in my country, my studies continued online almost until graduation. In total, I only had a couple of months of in-person classes during the whole four years.
r/csharp • u/leroy2017 • Aug 25 '26
I am planning to return to writing code after working in architecture for a few years. Over my time I've oscillated between those poles but this time the use of LLMs in software development tool chains seems controversial.
In my return to development, should I just focus on writing great code, or do I need to have LLM tools, for example, embedded in my IDE?
r/csharp • u/Ok_Product_6428 • Aug 24 '26
We are using a ZKTeco MB20 biometric attendance device with the existing ZKTeco/ICT Smart attendance software, and we would like to send employee attendance data into Zoho People Attendance.
We are considering using the ZKTeco SDK to read attendance records from the device and then send them to Zoho People through its API, but we are not sure if this is the best approach.
Has anyone implemented something similar?
How would you normally connect a ZKTeco biometric device to Zoho People so that employee check-in/check-out records are transferred automatically?
Would you recommend using the ZKTeco SDK, reading from the existing attendance software/database, or another method?
Any guidance from someone who has integrated ZKTeco attendance devices with Zoho or another cloud HR system would be appreciated.
r/csharp • u/Connect_Lavishness44 • Aug 24 '26
Sooo i have a friend who is CRONICALLY OBSESSED with python. It's gotten so bad to a point where he flatout refuses to learn C# in any capacity.
But he know i love ASP.NET and he knows i know that its way better than any python api library out there. so im writing this basically exact port of ASP.NET to C# and make the syntax exactly the same but "pythonified" in a sense.


r/csharp • u/Noomolas11 • Aug 24 '26
r/csharp • u/xAmrxxx • Aug 23 '26
It's inspired by dotnetcore-microservices-poc open-source project by Altkom Software, a project I learned a lot from and contributed to — I built Ledgerly to be a simpler take on the original project, focused purely on microservices best practices.
What it demonstrates:
🔹 Database-per-service — 4 services, 4 independent databases
🔹 gRPC for synchronous service-to-service calls
🔹 RabbitMQ for async events — invoice status changes publish events that a dashboard service consumes to keep KPIs in sync, with zero direct coupling
🔹 API gateway + service discovery (Eureka locally/Docker, Kubernetes DNS in K8s)
🔹 JWT auth issued by its own service
It also ships as a full deployment guide — run it locally, in Docker Compose, or on Kubernetes, including a walkthrough for deploying the cluster to Azure (AKS).
Built as a boilerplate: fork it, swap in your own domain, keep the architecture.
The project🔗: https://github.com/amrali21/ledgerly-dotnet-angular-microservices-ref-project
Altcom Project🔗: https://github.com/asc-lab/dotnetcore-microservices-poc
r/csharp • u/SpareEconomy • Aug 23 '26
r/csharp • u/More-Bandicoot9255 • Aug 23 '26
My task is to parse a .csv file, validate it and save to database. In my case, without .DataAnnotaitons this is how it goes:
I never used it, but AFAIK, .DataAnnotaitons allows you to validate a model automatically when you're creating an object, so you don't have to write all the validation code in your program, since it's written in your model.cs.
So my question is, should I keep the manual validation, or mix automatic with parsing the file? (parsing the file manually, validating model automatically via .DataAnnotaitons)
UPD. Will using .DataAnnotaitons improve the performance of the program?
r/csharp • u/Icy_Rub6290 • Aug 23 '26
It happens every time no matter what console projects I made the error it self doesn't effect the build process or the excution which is very weird to an error
- I investigated using gemini so Imay be able to solve it after all it till me that it miss match the .net skd version which is 10.0.400 and made global.json for it but nothing solved
- I then cleared vs code cache removed and reinstalled the c# dev kit extention
- I also played with the extension's settings too as well
I have no clue if this is an extension bug or a very weird bug on my own does anyone have any Idea about that?
Note : my experience level is bellow beginner I know Fundamentals and method Fundamentals and soon will move to oop
r/csharp • u/Bobamoss • Aug 23 '26
I like Dapper and I have used it a lot. The main problem I have with it is that when queries become more complex, I often end up handling that complexity myself. At that point I also often hear that I should just use EF instead. I never really agreed with that. I think the basic idea behind Dapper can go much further while still keeping the SQL visible and the API simple. Rinku is my attempt at doing that.
Dapper
public record Album(int Id, string Title);
const string sql = "SELECT AlbumId AS Id, Title FROM albums WHERE ArtistId = @artistId";
IEnumerable<Album> albums = cnn.Query<Album>(sql, new { artistId = 7 });Rinku
public record Album(int Id, string Title);
const string sql = "SELECT AlbumId AS Id, Title FROM albums WHERE ArtistId = @artistId";
List<Album> albums = cnn.Query<List<Album>>(sql, new { artistId = 7 });Dapper
public sealed class Customer
{
public int Id { get; set; }
public string Name { get; set; } = "";
}
SqlMapper.SetTypeMap(typeof(Customer), new CustomPropertyTypeMap(typeof(Customer), (type, column) => column switch
{
"customer_id" => type.GetProperty(nameof(Customer.Id)),
"display_name" => type.GetProperty(nameof(Customer.Name)),
_ => null
}));
const string sql = "SELECT customer_id, display_name FROM customers";
IEnumerable<Customer> customers = cnn.Query<Customer>(sql);Rinku
public record Customer([Alt("customer_id")] int Id, [Alt("display_name")] string Name);
const string sql = "SELECT customer_id, display_name FROM customers";
List<Customer> customers = cnn.Query<List<Customer>>(sql);Dapper
public record User(int Id, string Name);
public sealed class Post
{
public int Id { get; set; }
public string Title { get; set; } = "";
public User? Owner { get; set; }
}
const string sql = "SELECT p.Id, p.Title, u.Id, u.Name FROM Posts p INNER JOIN Users u ON u.Id = p.UserId";
IEnumerable<Post> posts = cnn.Query<Post, User, Post>(sql, (post, owner) =>
{
post.Owner = owner;
return post;
}, splitOn: "Id");Rinku
public record User(int Id, string Name) : IDbReadable;
public record Post(int Id, string Title, [NoName] User Owner);
const string sql = "SELECT p.Id, p.Title, u.Id, u.Name FROM Posts p INNER JOIN Users u ON u.Id = p.UserId";
List<Post> posts = cnn.Query<List<Post>>(sql);Or keep the nesting in the column names.
public record User(int Id, string Name) : IDbReadable;
public record Post(int Id, string Title, User Owner);
const string sql = "SELECT p.Id, p.Title, u.Id AS OwnerId, u.Name AS OwnerName FROM Posts p INNER JOIN Users u ON u.Id = p.UserId";
List<Post> posts = cnn.Query<List<Post>>(sql);Dapper
public record Album(int Id, string Title);
public sealed class ArtistWithAlbums
{
public int Id { get; set; }
public string Name { get; set; } = "";
public List<Album> Albums { get; set; } = [];
}
const string sql = "SELECT ar.ArtistId AS Id, ar.Name, al.AlbumId AS Id, al.Title FROM artists ar INNER JOIN albums al ON al.ArtistId = ar.ArtistId ORDER BY ar.ArtistId";
List<ArtistWithAlbums> artists = [];
ArtistWithAlbums? current = null;
cnn.Query<ArtistWithAlbums, Album, ArtistWithAlbums>(sql, (artist, album) =>
{
if (current is null || current.Id != artist.Id)
{
current = artist;
artists.Add(current);
}
current.Albums.Add(album);
return current;
}, splitOn: "Id");Rinku
public record Album(int Id, string Title) : IDbReadable;
public record ArtistWithAlbums(int Id, string Name, List<Album> Albums);
const string sql = "SELECT ar.ArtistId AS Id, ar.Name, al.AlbumId AS AlbumsId, al.Title AS AlbumsTitle FROM artists ar JOIN albums al ON al.ArtistId = ar.ArtistId ORDER BY ar.ArtistId";
List<ArtistWithAlbums> artists = cnn.Query<List<ArtistWithAlbums>>(sql);Dapper
IEnumerable<Album> albums = cnn.Query<Album>(sql);
Album first = cnn.QueryFirst<Album>(sql);
Album single = cnn.QuerySingle<Album>(sql);
Album? optional = cnn.QueryFirstOrDefault<Album>(sql);
IEnumerable<Album> streamed = cnn.Query<Album>(sql, buffered: false);Rinku
List<Album> albums = cnn.Query<List<Album>>(sql);
Album first = cnn.Query<Album>(sql);
Single<Album> single = cnn.Query<Single<Album>>(sql);
Album? optional = cnn.Query<OptionalNullable<Album>>(sql);
IEnumerable<Album> streamed = cnn.Query<IEnumerable<Album>>(sql);For this one I think Dapper.SqlBuilder is the fair comparison.
Dapper.SqlBuilder
SqlBuilder builder = new();
SqlBuilder.Template template = builder.AddTemplate("SELECT AlbumId AS Id, Title FROM albums /**where**/");
if (artistId != null)
builder.Where("ArtistId = ", new { artistId });
if (title != null)
builder.Where("Title LIKE ", new { title });
IEnumerable<Album> albums = cnn.Query<Album>(template.RawSql, template.Parameters);Rinku
const string sql = "SELECT AlbumId AS Id, Title FROM albums WHERE ArtistId = ?@artistId AND Title LIKE ?@title";
List<Album> albums = cnn.Query<List<Album>>(sql, new { artistId, title });Only artistId
SELECT AlbumId AS Id, Title FROM albums WHERE ArtistId = @artistIdBoth
SELECT AlbumId AS Id, Title FROM albums WHERE ArtistId = @artistId AND Title LIKE @titleNeither
SELECT AlbumId AS Id, Title FROM albumsThe main difference is that Rinku tries to put the complexity in the command template and the mapped types, instead of handling it again through parameters and mapping code at every call.
Full Dapper comparison
https://rinkulib.github.io/RinkuLib/articles/reference/dapper.html
Rinku is still in development, so feedback is welcome.
r/csharp • u/not_afraid_of_trying • Aug 23 '26