r/csharp

Criei uma aplicação CLI para criptografar/decriptografar arquivos pessoais.
▲ 6 r/csharp+1 crossposts

Criei uma aplicação CLI para criptografar/decriptografar arquivos pessoais.

Durante os últimos meses fiz um projetinho pessoal onde criei uma aplicação de console que permite você criptografe seus arquivos usando criptografia AES.

A ideia é de gerar arquivos protegidos por senha, mas usando criptografia AES, e dando opções extras de validação, compressão, criação e export de chave, etc...

Sei que existem ferramentas que já fazem isso, até mesmo algumas ferramentas nativas do windows. Mas fiz esse projetinho com o intuito de facilitar minha vida diminuindo a quantidade de passos necessários para uma tarefa supostamente simples. Proteger meus arquivos.

Caso alguém queira dar uma olhadinha, e opinar na estrutura do projeto, ou até mesmo sobre boas práticas, pode se sentir a vontade, aqui está o repo no github: Adler-Targino/MyCrypt: CLI Tool for encrypt/decrypt operations

Pretendo dar continuidade no projeto, criar algum tipo de UI ou até mesmo integrar aos menus do windows.

u/adiley_ — 12 hours ago
▲ 26 r/csharp+1 crossposts

Our Web IDE now exports C#+XAML to native macOS and Linux too (in-browser, WASM) (xaml.io)

Hi everyone,

Quick follow-up to our previous post about Windows .EXE export: xaml.io can now also export to macOS and Linux. So the publish flow now covers all three desktop OSes.

xaml.io exports your C# + XAML project to a native binary for each platform:
• Windows .exe
• macOS .app bundle (ad-hoc signed)
• Linux executable (x86_64)

A few details that might be interesting to this sub:

• The whole toolchain still runs in the browser via WebAssembly. No backend compile step, nothing uploaded to a server. Your code stays local.

• What runs where, to head off a common question: the WebAssembly part is only the IDE itself. The desktop apps it produces are real native .NET processes. Your C# runs as native code in-process (same as a WPF or WinForms app). The process embeds the OS's built-in WebView (Edge WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux) via Photino purely as the UI rendering surface. Not Electron-style, not WASM at runtime.

• The macOS ad-hoc code-signing happens client-side too, in WASM. We ended up vendoring a small subset of Filip Navara's Melanzana (.NET Mach-O writer + CodeDirectory hasher) and lazy-loading it so non-Mac users don't pay for the bytes on first paint. This client-side code-signing was the part we weren't sure was possible until we got it working.

• Still no install, no signup (unless you want to save to the cloud or use AI).

• It's free.

Honest caveats up front:

• Apps are unsigned in the "publisher identity" sense (no Apple Developer ID, no Windows Authenticode), so first-launch warnings on macOS Gatekeeper and Windows SmartScreen still apply. The bundled README has the bypass for each. Support for user-supplied code-signing certificates is on the way.

• macOS is Apple Silicon (arm64) only for now. Linux is x86_64 only.

• Linux uses WebKitGTK 4.1 (preinstalled on Ubuntu 22.04+, Debian 12+, Fedora 38+, Arch). Older distros may need a one-time install. The bundled README has the package names.

If you've tried xaml.io and bounced off, still genuinely curious what was missing. Bug reports and "this is still missing X" feedback both welcome. We read everything that gets posted here.

Thanks!

u/Userware — 13 hours ago
▲ 30 r/csharp

Request to moderators about AI training accounts

You need to ban bot activity that is obviously farming for AI training data. Otherwise I'm going to write my own bot that fucks with them and provides poison training data

reddit.com
u/jbaker88 — 21 hours ago
▲ 0 r/csharp

AI ML For C# Developers

One of the biggest pain points for C# developers getting started with AI/ML is that they first need to learn Python and then learn the concepts of AI/ML.

But if AI/ML concepts are first taught using C#, and then later mapped to Python, the learning curve becomes much easier and more practical.

Also, many people think Python is mandatory for AI/ML. The reality is that you can leverage languages like C# and Java very effectively to build AI solutions.

In this video series, we will go through the following lessons with both theory and practical demonstrations:

  • Introduction — Roadmap of AI/ML for C# Developers
  • Lesson 1 (Theory) - What is AI and ML?
  • Lesson 2 (Theory) - How Humans Learn? Features and Labels
  • Lesson 3 (Theory) - Features, Labels, Algorithm, Training, Model (FLATM)
  • Lesson 4 (Lab 1) - Understanding FLATM using simple Excel examples
  • Lesson 5 (Theory) - Algorithm (Formula) vs Model
  • Lesson 6 (Theory) - Understanding Regression
  • Lesson 7 (Lab 2) - Simplest ML.NET Regression Code (Definition, MLContext & MKL Components)
  • Lesson 8 (Lab 3) - Model is a Mathematical Formula
  • Lesson 9 (Theory) - Inference vs Training
  • Lesson 10 (Theory) - Roadmap for AI/ML

Happy Learning 🙂

youtube.com
u/questpond123 — 14 hours ago
▲ 33 r/csharp+1 crossposts

Feedback needed: Qt Bridges for C#

Hi folks! Disclaimer: Qt employee here.

We have just announced the Qt Bridges for C#.

Our goal is to make it possible to use Qt QML/Quick as a frontend with a backend written in a language other than C++. C# comes first.

You may say that there are C# bindings for Qt. Yep, that's true. Bindings allow you to write Qt apps in a Qt way, even with a different language. The Qt Bridges for C# technology will let you write apps more in a C# style, not like Qt-through-a-C#-keyhole.

I am not the project creator and cannot explain everything in this post. I was only involved in some documentation editing back in the day 😄
Cristián explains it much better: https://www.qt.io/blog/csharp-ui-framework-via-bridging-technology

What we really need is your honest feedback. We would be happy if you tried it out and let us know what you think. Honest criticism is the point of this post. Cristián will try to answer all the possible questions here in replies.

u/AC_qt — 23 hours ago
▲ 6 r/csharp+1 crossposts

Need Help with ADHD and My Programing Career

Hello everyone. I really need some guidance and support.

I have started to believe that I may have ADHD, although I have never been formally diagnosed. In Pakistan, proper diagnosis and treatment options are limited and often too expensive for me to afford. Still, I experience many of the symptoms, and they have been affecting my life deeply.

I completed my Bachelor’s degree in Political Science from 2017 to 2021. After that, I planned to prepare for the CSS exams, which are considered a major opportunity here. But I have always struggled with spelling and writing English essays. I tried for years to prepare, but because of this difficulty, I feel like I lost valuable time and direction.

Recently, my uncle, who is a programmer, encouraged me to learn coding so I could build a stable career. He believes I have the ability to succeed and suggested I start with C# and work toward becoming a .NET developer. I want to believe him. I want to believe in myself too. But the reality has been very hard.

After so many years focused on a different path, I am now struggling to learn something entirely new. It took me two months just to go through part of an eight hour YouTube course, and I have not even completed it yet. There are moments when I feel a spark, when I can focus and things suddenly make sense, and I feel alive with possibility. But those moments disappear quickly, and I fall back into procrastination and frustration.

I have tried medication like Ritalin. It helps me focus for three or four hours, but afterward I feel completely drained. If I take it for several days in a row, I crash hard and spend days unable to move, eat properly, or even step outside. It feels like I am stuck in a cycle of brief clarity followed by deep exhaustion.

I am honestly scared. It feels like my future is slipping away while I am fighting battles inside my own mind that no one else can see. I want to work. I want to learn. I want to build a life where I am not constantly disappointed in myself.

If anyone has gone through something similar, especially with ADHD and learning programming, I would truly appreciate your advice. I would also be grateful for any C# or ASP.NET resources that are easier to follow for someone who struggles with focus and consistency.

Right now, I feel lost, but I have not given up yet. I am still here, still trying, and hoping that someone can help me find a way forward.

u/Patient-Being4188 — 1 day ago
▲ 148 r/csharp+2 crossposts

Hoje finalizei o desenvolvimento da Navbar do meu projeto em ASP.NET Core MVC utilizando C#, Bootstrap e Font Awesome.

u/2025Activated — 1 day ago
▲ 0 r/csharp

WPF or WinUI 3? Which one do you prefer for desktop development?

I build desktop apps using WPF, but I’ve been looking into WinUI 3 lately. While WinUI brings modern UI design out of the box, WPF still feels like the safest bet due to its maturity, stability, and massive ecosystem. Are you sticking with the battle-tested reliability of WPF, or are you adopting WinUI 3 for new projects? What’s your take?

reddit.com
u/icarodeveloper — 1 day ago
▲ 0 r/csharp

Is AI not well trained on CIL/assembly code?

Is AI not as well trained with low level languages due to the relatively low amount of information online compared to high level languages?

You have StackOverflow and many other websites with tutorials and QnAs to do with high level languages, but not many for CIL.

I prompted ChatGPT with this:

>Write a C# method called MethodA that calls MethodB.
MethodB does a mathemtical task that will result in an overflow.
MethodA should make sure MethodB is "checked" so that it throws an exception if an overflow happens.

And it provided me this solution which doesn't work:

public class Calculator
{
    public void MethodA()
    {
        checked
        {
            MethodB();
        }
    }

    public int MethodB()
    {
        int a = int.MaxValue;
        int b = 10;

        // This will overflow and throw OverflowException because of MethodA's checked context
        return a + b;
    }
}

You need to understand the CIL to understand why this doesn't work (hint: it's because it changes the add instructiont o an add.ovf instruction only for code directly inside the checked block).

I'm wondering if this lack of training could cause issues further down the track as AI develops and more developers focus even less on understanding how code works behind the scenes.

reddit.com
u/david_fire_vollie — 1 day ago
▲ 0 r/csharp

What's easier to break into without a degree? C# .NET developer or Cloud Engineering?

Like the title says. For someone with no tech background or CS degree, what's easier to break into?

reddit.com
u/Justpassinby1984 — 1 day ago
▲ 13 r/csharp

Tips building a cli tool in c#

I started making a small cli tool for formatting logs in c#, but since I've never built one before I'm kinda lost, trying to avoid using AI besides basic questions since this is for learning purposes. Of you've built one before, would you mind sharing some tips? How did you structured your tool, libs you used, etc.

reddit.com
u/thicctak — 1 day ago
▲ 3 r/csharp

C# iteration concept IEnumerable<T>, IEnumerator<T>, collections, ...

Hi, I've read some documentation, tested things, and watched tutorials, but I'm still struggling to fully understand how these different tools work together (IEnumerable<T>, IEnumerator<T>, their methods, collections, etc.). I generally understand the concepts separately, but here's what I think I've grasped:

- IEnumerable<T> indicates that an element can be iterated over (that's what the foreach loop expects: an enumerable element).

- IEnumerator<T> indicates how to iterate over this element using Current, MoveNext(), and Reset().

- Collections already implement all the necessary tools for iterating over them (although I often see examples where IEnumerable is implemented in a class just to iterate over a collection).

That's basically what I understand.

reddit.com
u/Ok-Presentation-94 — 1 day ago
▲ 5 r/csharp

C# to Creative developer help

Hi all to give a bit of context I've been a programmer for 4 years mainly using JQuery, C# and VB. Recently I quit programming thinking of a career change, but I thought I might give it another chance by trying some more creative solo projects to see if it was more fun like making a game, audio, interactive displays etc... However, I'm struggling getting stared I've never really done a solo project or anything without an existing codebase and I don't know where to begin.

I was wondering if anyone had any advice on how to get started, project ideas, or how to pivot into this type of programming from backend experience.

reddit.com
u/Nich-olas — 1 day ago
▲ 8 r/csharp

Resources to learn C# for an experienced C++/Java/Python developer ?

Hi everyone !

I want to learn C# but most tutorials I've found are too beginner-oriented. I already know C++, Java and Python, so I'm mostly looking to understand C#-specific idioms, patterns, and the .NET ecosystem rather than programming fundamentals.

My end goal is to use it in Unity, but I want a solid language foundation first.

Any recommendations?

Cheers !

reddit.com
u/SheSaidTechno — 1 day ago
▲ 426 r/csharp

Senior dev... I don't think I can pass an interview

I need a sanity check... I have been actively working my whole career, head down, creating all modern styles of projects.. DI, service style architecture, asynchronous, .net 9, mvvm, blazor, nosql, webapi, etc..

I am looking for a new role and I feel like i can not answer basic questions, such as:
What are managed and unmanaged pieces of code? Explain code compilation in C#.,What's serialization? What are some common places to find a deadlock? What's the primary use of delegates? etc..

I am literally a blank, I have been working not taking c# courses... does anyone feel this way? I have 25yoe and I feel like I am toast

reddit.com
u/Inevitable_Guide_942 — 3 days ago
▲ 2 r/csharp

I embedded a scripting engine in a TUI app and it kind of blew up into its own thing

A few years ago I was working on a BLE device simulator for mobile app testing. I needed a way to script device behavior without recompiling every time, so I built a small embedded scripting engine for .NET. Stack-based, RPN style, vaguely inspired by HP calculator RPL.

That engine eventually became MOGWAI, which I've been developing on the side for about 10 years and open-sourced earlier this year.

Recently I thought: what if I used MOGWAI as the scripting layer for a TUI app builder? You describe your UI in a script, MOGWAI runs it, Terminal.Gui renders it. No C# required by the end user.

So I built GIZMO.

Here's what a real-time clock looks like:

mogwai.reset

timer 'clock' every 1000 do
{
    now -&gt;date -&gt; '$d'
    $d hour:   get "00" -&gt;format -&gt; '$h'
    $d minute: get "00" -&gt;format -&gt; '$m'
    $d second: get "00" -&gt;format -&gt; '$s'
    "{! $h}:{! $m}:{! $s}" eval -&gt; '$time'
    [! name: 'lbl' text: @$time] window.update
}

[!
    name: 'main'
    title: "Clock"
    childs:
    (
        [ui.kind: 'ui.label' name: 'lbl' text: "00:00:00"]
        [ui.kind: 'ui.button' label: "Close" onClick: { false window.hide }]
    )
]

'clock' timer.start
window.show drop

The syntax is unusual, I know. RPN takes a minute to click but once it does it's kind of addictive.

The interesting part on the .NET side is the integration between MOGWAI and Terminal.Gui. Both need to run on the main thread, so there's a shared pump that keeps both alive. MOGWAI timers stay active even when a dialog is open.

GIZMO ships as self-contained executables (no .NET runtime needed), includes 15 UI components, a theme system, and a built-in TUI code editor you can launch from the REPL.

Still early but it works. Happy to answer questions about the architecture or the scripting engine.

GitHub: https://github.com/Sydney680928/Gizmo Website: https://gizmo.mogwai.eu.com

u/sydney73 — 1 day ago