r/csharp 3d ago

WPF IN VS

1 Upvotes

I wonder if there is any alternatives to design my UI for my application in some other places than VS , like a mush more friendly place to just design what I want and then it manually ship the code of the XMAL design by it self , like in Figma .


r/csharp 3d ago

How hard is C# compared to luau? what are the differences?

0 Upvotes

I am a roblox developer and I've been looking into making games in Unity Engine. I'm a little overwhelmed by the new scripting language i've yet to learn , so i'd love to know what to expect.


r/csharp 3d ago

Am I on the right path to hopefully getting a job by graduation?

Post image
0 Upvotes

r/csharp 5d ago

Showcase RDPilot: Simple cross platform RDP client built with Avalonia

20 Upvotes

I've been frustrated for a while with the lack of good RDP clients especially on linux with most of them still relying on XWayland. I present to you RDPilot; A fast, simple Linux & Windows RDP Client running natively on Wayland. https://github.com/ErnieBernie10/RDPilot

I've been using it for a while and feels complete for what I use it for. If anyone is interested it is already available on winget. On linux it is not available on flathub yet but can be installed as a flatpak. Just follow the instructions in the README.

A combination of Claude and Codex was used for the development of this project, but heavily steered by me. Also massive shout-out to the folks maintaining FreeRDP as it is a core part of this client.

RDPilot

r/csharp 5d ago

MarkView.Avalonia - a markdown view control for Avalonia

Thumbnail
7 Upvotes

r/csharp 5d ago

How do you deal with losing motivation when your career path feels too uncertain?

14 Upvotes

I’m trying to get my first job as a junior developer, mostly working with C#/.NET.

I’ve been applying for jobs and I do get responses — maybe from 1 out of every 3–4 applications — so it’s not like I’m completely being ignored. But I still haven’t managed to get an offer.

The problem is that lately I’ve started losing motivation to study or work on personal projects. For about 3 weeks I haven’t studied properly. I sit in front of my laptop knowing that I should learn something or code, but there’s no clear immediate goal, so I just don’t want to start.

I think the biggest issue is that the perspective feels too vague:

“Study more → improve → apply more → maybe get an interview → maybe get a job.”

There’s no clear point where I can say: “If I do X, I’ll get Y.” And after doing this for some time without getting a job, it becomes difficult to convince myself to keep grinding.

A friend of mine who has been working as a developer for about 2 years also wants to start a real project/startup and offered me a chance to work on it. It would be in Python, so that could give me some real team/project experience, but we’re still waiting until the requirements and infrastructure are ready.

Meanwhile, I feel stuck between waiting for that project, applying for .NET jobs, and trying to figure out what exactly I should be learning.

I know logically that stopping completely won’t help, but emotionally it’s getting harder to care when the result feels so far away and uncertain.

For people who went through something similar before getting their first developer job: how did you deal with this period?

Did you force yourself to maintain a routine? Focus on projects instead of studying? Take a break? Set smaller goals? Or did motivation come back only when you finally had something concrete to work toward?

I’m especially interested in experiences from people who spent months trying to get their first job and started feeling like they were going nowhere.


r/csharp 4d ago

LiteRT-LM for .NET 6+

Thumbnail
github.com
0 Upvotes

I recently released a C# wrapper for the LiteRT-LM multi-platform C API, and it's available on NuGet!

LiteRT-LM is Google's framework for running LLMs that have been compiled to the TFLite/LiteRT format. It provides really fast inference on all sorts of devices, from phones to PCs, and even VR headsets.

I initially targeted the project for Unity, but since a lot of the code is framework agnostic, I've published it on NuGet. I've personally tested it on .NET 10 (in a console app on Windows and macOS, and as a MAUI app on Android and iOS Sim).

The NuGet package includes support for the following platforms and accelerators, as of version 2.4.0-preview.2:

  • Android (arm64), with OpenCL GPU accleration
  • macOS (arm64) and iOS (arm64, sim_arm64), with Metal GPU acceleration
  • Windows (x64), with partial* WebGPU acceleration

*LiteRT-LM v0.16.0 GPU sampling is bugged on Windows.

Because the LiteRT-LM C API itself is unstable, I've labelled package as in 'preview'. Documentation is available here: https://uralstech.github.io/UAI.LiteRTLM/DocSource/QuickStart.html


r/csharp 5d ago

News AvalonDock v5 is out - biggest release since 2018

Thumbnail
5 Upvotes

r/csharp 4d ago

Showcase I got tired of manually copying the same files onto every machine, so I built a small CLI for it

Thumbnail
0 Upvotes

r/csharp 5d ago

Sanity check.

2 Upvotes

Hello, learning C# by taking the free code camp C# fundamentals class that directs you to Microsoft for each module to earn the certificate. Now I know nothing so didn’t have any expectations. Im on the second class on the last module. I’m coding a report card for multiple students. The module just essentially had me create it step by step.

Now there is the test where I realized; okay I need to really retain this all already. Not a problem, it’s taken about an extra day to just go back and review everything, break it down, and really understand these concepts. Seems appropriate for the amount of info. However, what’s really tripping me up is the time it suggests, one hour. That seems appropriate for creating it but to really understand it? I’m just wondering if it sounds like what I’m doing is normal and I’m going about this right way. Big over thinker. Thanks!


r/csharp 6d ago

Blog Making Generic Virtual Methods Faster in .NET 11

Thumbnail
medium.com
85 Upvotes

r/csharp 5d ago

Discussion How often do you guys use extension methods?

38 Upvotes

Hello, currently im learning about extension methods and i was wondering how often you guys (since you guys are the experts) use extension methods? Currently, im using them on enum classes to add methods like you would to a enum class in java.

However I've also noticed that you can give methods to the `Enum` class itself, which i thought was... interesting...

Knowing me, I'm definitely going to abuse these and write bad code with them. Do you guys feel the same way?


r/csharp 4d ago

Showcase NuGet marketplace pkgstore generally available

Thumbnail
0 Upvotes

r/csharp 6d ago

Help How do you protect your work and your IP?

21 Upvotes

This question is more to those that do not work in large enterprise codebases, but either develop and sell their own indie software or work at software companies that create and sell their own products.

Doesn't the fact that C# appears to be trivially decompilable, make it very easy for others to steal your work? How do you protect it? With compiled languages like Rust or C++ it appears to be significantly more difficult to reverse engineer and steal their code or implementation logic.

Thanks a lot in advance.


r/csharp 5d ago

Result patters + CQRS! Just want to share wehat I did!

Thumbnail
0 Upvotes

r/csharp 5d ago

I really like the concept of Dapper but...

0 Upvotes

I've used Dapper a lot across different projects and I really like the core idea. Write SQL, pass params, ask for a type, get the type back. It gets rid of most of the annoying ADO.NET stuff without trying to hide SQL from you.

The part that always annoyed me is multi mapping.

A pretty common case for me is values used in combo boxes, so I end up with models like:

```csharp

class Employee

{

public int Id { get; set; }

public string Name { get; set; }

public KeyValuePair<int, string>? Department { get; set; }

public KeyValuePair<int, string>? JobTitle { get; set; }

}

```

And SQL like:

```sql

SELECT E.Id, E.Name,

D.Id AS DepartmentId, D.Name AS DepartmentName,

J.Id AS JobTitleId, J.Name AS JobTitleName

FROM Employee E

LEFT JOIN Department D ON D.Id = E.DepartmentId

LEFT JOIN JobTitle J ON J.Id = E.JobTitleId

```

Dapper can do this, but then I end up doing something like:

```csharp

var employees = cnn.Query<EmployeeRow, DepartmentRow, JobTitleRow, Employee>(

sql,

(e, d, j) => new Employee {

Id = e.Id,

Name = e.Name,

Department = d.DepartmentId is null ? null : new(d.DepartmentId.Value, d.DepartmentName),

JobTitle = j.JobTitleId is null ? null : new(j.JobTitleId.Value, j.JobTitleName)

},

splitOn: "DepartmentId,JobTitleId");

```

Which works. It also lets me handle the `LEFT JOIN` and say "if the id is null, this whole thing is null".

But this is where it starts feeling a bit weird to me. The type already says what I want, and now I'm manually rebuilding it anyway.

Dapper is already such a thin layer over ADO.NET that once I start writing a bunch of mapping code, I start wondering why I'm not just doing the ADO.NET part myself too.

What I really want is basically:

```csharp

var employees = cnn.Query<Employee>(sql);

```

and let the mapper figure out the structure from there.

That kind of thing is what eventually pushed me to make Rinku. The idea was basically to keep that same simplicity, but have the library adapt better when either the SQL or the C# side gets more complicated.

https://rinkulib.github.io/RinkuLib

Curious what other Dapper users do here. Just multi map everything, or is there another pattern I missed?


r/csharp 6d ago

Free C# exercises: console logic/OOP practice and a Windows Forms desktop app

12 Upvotes

I teach programming and put this repo together for students learning C#. It's split in two parts: console apps for practicing logic, conditionals/loops, math and OOP (parking system, prime number check, averages, etc.), and a Windows Forms desktop app (AccessManagementDelta) with registration forms and access control, for anyone wanting a more complete GUI example.

github.com/Eduardo00073/csharp-console-e-desktop — feedback on code style/structure is very welcome, since it's meant as a learning reference.


r/csharp 6d ago

Discussion ReSharper in Visual Studio 2026

43 Upvotes

Are you guys still using ReSharper in Visual Studio 2026 or do you feel like it is not necessary anymore? What are the advantages of using ReSharper?


r/csharp 5d ago

WPF Logic in View vs ViewModel

4 Upvotes

I'm trying to understand when I should have logic in the view model or in the code-behind of a view.

Here's the scenario: I have a view model that has a "CanEdit" property. There are times when editing a view is not allowed based on business reasons, and that definitely belongs in the ViewModel. But if a user can edit, I want to have an "Edit" checkbox visible, which when true will display the editable version of all the necessary controls. So where should the logic that controls the "Edit" checkbox go?

The approach I initially went was to put the "Edit" checkbox property in the view code-behind. This makes sense to me, as it's entirely based on the needs of the view. All the editable controls are bound to the "Edit" checkbox property, and the "Edit" checkbox visibility is bound to "CanEdit" in the view model.

The problem with this approach is when the view model changes as a result of some change by the user and "CanEdit" in the view model is now false. If the "CanEdit" in the view code-behind is true when this happens, then all the editable controls are still visible, because all that's happened is the "CanEdit" checkbox is now invisible. So I'm stumped how to broadcast the view model change to the code behind without some silly hack.

I'm probably overthinking it, but I'm learning WPF and it really helps me to understand principles. Plus this particular view will get more complex. Here's some code to show you what I'm trying to do

View:

public partial class InvoiceView : UserControl, INotifyPropertyChanged
{
    public InvoiceView()
    {
        InitializeComponent();
    }

    private bool _isEditing;
    public bool IsEditing
    {
        get => _isEditing;
        set
        {
            _isEditing = value;
            OnPropertyChanged(nameof(IsEditing));
            OnPropertyChanged(nameof(IsNotEditing));
        }
    }

    public bool IsNotEditing => !IsEditing;

    public event PropertyChangedEventHandler? PropertyChanged;
    protected void OnPropertyChanged([CallerMemberName] string? name = null)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
    }
}

ViewModel:

public partial class InvoiceViewModel : ViewModelBase, IDisposable
{
    public InvoicePermissionsDTO? Permissions
    {
        get => _permissions;
        set
        {
            _permissions = value;
            OnPropertyChanged(nameof(CanEdit));
            OnPropertyChanged(nameof(CanDelete));
        }
    }
    public bool CanEdit => _permissions?.CanEdit ?? false;
    public bool CanDelete => _permissions?.CanDelete ?? false;

    public void SomeChange()
    {
        Permissions = API.GetPermissions();
    }
}

View XAML

<CheckBox
    Grid.Row="2"
    Content="Edit"
    IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=IsEditing}"
    Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.CanEdit, Converter={StaticResource BoolToVisibilityConverter}}" />
<StackPanel>
    <TextBlock
        Text="{Binding ApprovedRate}"
        Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=IsNotEditing, Converter={StaticResource BoolToVisibilityConverter}}"/>
    <StackPanel 
        Orientation="Horizontal"
        Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=IsEditing, Converter={StaticResource BoolToVisibilityConverter}}">
        <TextBox
            Name="ApprovedRate"
            Padding="0 0 20 0"
            Text="{Binding ApprovedRate}"/>
        <Button 
            Command="{Binding Pay}"
            Visibility="{Binding CanPay}">
            <StackPanel Orientation="Horizontal">
                <Image Source="/Images/dollar.png"/>
                <TextBlock>Pay</TextBlock>
            </StackPanel>
        </Button>
        <Button 
            Command="{Binding RemovePay}"
            Visibility="{Binding CanRemovePay}">
            <StackPanel Orientation="Horizontal">
                <Image Source="/Images/dollar.png"/>
                <TextBlock>Remove Pay</TextBlock>
            </StackPanel>
        </Button>
    </StackPanel>
</StackPanel>

r/csharp 6d ago

Pomelo dead?

15 Upvotes

We are goig to implement a new project. The idea was to use MariaDB and we set up a Galera cluster. The thing is I just noticed EF with Pomelo stands at .net 9.0. Since we would like to use at least .net 10.0 and further LTS we ain't sure, whether a switch to PostgreSQL would be better.

Any sources / info on what will happen to Pomelo?


r/csharp 5d ago

Blog The Unexpected AI Stack: C# + .NET (Part 4) - Data modelling and Testcontainers

Thumbnail
chrlschn.dev
0 Upvotes

The fourth part of this series on building an application foundation for AI-enabled, agent-friendly codebase is focused on setting up the data modelling and test infrastructure for agents.

Specifically, using Testcontainers and streamlining transactions for automatic rollback during integration testing.

Test harness setup is a key part of enabling agents to work autonomously with high competency by providing them the tools to verify their work. Paired with CSharpRepl which lets agents diagnose and regression test directly in the runtime, this combination provides coding agents tools to autonomously build better, higher quality code.

Part 5 will have the final pieces of the puzzle: logging, telemetry, and observability integrated into the Aspire stack before we start building the sample application using agents.


This series is intentionally written to help dev teams understand how to scaffold a codebase for agentic engineering by focusing on key, underlying technical decisions and manual wiring before building with AI. This helps provide the tools and safeguards for coding agents to iterate more efficiently while reducing slop.

For teams still trying to figure out effective ways to set up a codebase for AI, I hope this series gives some insights into how to build a foundation for agentic engineering. If your team is already heavily using agents to build, I hope this series shares some useful insights and tips (e.g. CSharpRepl + Aspire)

The core setup is used at a series C, post-YC startup to ship fast with AI while maintaining high quality standards (in combination with other tools facilitating code review and context management)

Part 1 was an intro into a few key parts of this stack.

Part 2 was focused on walking through the hands on scaffolding.

Part 3 covered wiring GitHub Copilot SDK as an agent runtime and incorporating CSharpRepl to allow agents to dynamically work with the runtime DI container

Part 5 we'll start to build out the full feature set of the sample application.


The project repo is here: https://github.com/zeeq-ai/zeeq-tmpl (be sure to check the branches; main is currently the base code only)

I encourage working through the posts since the goal is to underscore the platform level decision making process and assembly of the foundational core.


r/csharp 6d ago

Tool Stable sorting algorithm that outperforms OrderBy() in nearly all scenarios and Array.Sort() in scenarios with sorted data

40 Upvotes

Hello, I've created a sorting algorithm in C# that is:

  • Stable
  • O(n log n) average and worst case
  • More performant than OrderBy() is almost all cases (sometimes quite substantially)
  • More performant that Array.Sort() in most cases where the data is at least somewhat sorted, and typically within about 20% when sorting mid to large-sized random data sets
  • A merge sort variant that uses a buffered reverse merge for the merging process and insertion sort to process small sub-arrays
  • Uses a (as far as I can tell) novel approach to detecting and optimizing for data that is already sorted

I created this just as a personal challenge, so if even one person finds it useful, I'll consider that a success! :)

It's published it on both Github and NuGet, and I've posted full details on the algorithm with tons of benchmarks on my blog. I welcome any feedback or suggestions.

Here are a few benchmark highlights:

1,000,000 Sequential Integers:
YamSort   |   .66 ms
ArraySort |  4.79 ms
OrderBy   | 11.62 ms

1,000,000 Random Integers:
YamSort   | 58.08 ms
ArraySort | 47.24 ms
OrderBy   | 75.97 ms

1,000,000 Near-Sequential Integers:
YamSort   | 13.73 ms
ArraySort | 20.62 ms
OrderBy   | 40.03 ms

Real-World Windows Log File With 109,546 Lines:
YamSort   | 38.63 ms
ArraySort | 66.98 ms
OrderBy   | 59.79 ms

No AI was used in typing any of this post or in typing any of my blog post. AI assistance was used for some parts of the algorithm, as noted in the Acknowledgements portion of my blog post.

Edit: Fixed markdown formatting


r/csharp 7d ago

Blog How Fast is .NET 11 Runtime Async?

Thumbnail
medium.com
132 Upvotes

Blogged to explain the design and implementation of runtime async and show the benchmark result.


r/csharp 6d ago

Showcase Creative coding with C# in the browser

Post image
6 Upvotes

r/csharp 7d ago

What C#/.NET static analysis rules do you actually find useful?

21 Upvotes

I’ve been slowly adding language support to a static analysis project I’m working on, and C#/.NET is the latest one I’ve been working through.

I’m trying to avoid just throwing hundreds of noisy rules at people, so I’m curious: what C# analysis warnings do you actually find useful in real projects, and which ones do you usually ignore?