Signals that C# code was AI-generated
.NET has detailed official conventions, and assistants follow all of them at once. Generated C# often reads like a sample from the documentation: correct, complete and slightly heavier than the problem needed.
- XML doc comments on every member.
/// <summary>blocks withparamandreturnstags on private helpers and simple properties, in a project that never generates documentation. - Interface for everything. An
IOrderServicefor everyOrderService, even in a small console app with no dependency injection or tests that would use the interface. - Textbook argument guards.
ArgumentNullException.ThrowIfNullor?? throw new ArgumentNullException(nameof(x))on every parameter of every public method. - Async by the book. An
Asyncsuffix on every method,CancellationTokenparameters threaded through code that never cancels, andConfigureAwait(false)sprinkled in application code. - LINQ in place of every loop. Query chains with
Where,SelectandToListused uniformly, including for simple counts where the rest of the codebase usesforeach.
Unity scripts have their own tells
Generated Unity code tends to declare fields as [SerializeField] private with [Header]and [Tooltip] attributes on each one, cache every component in Awake with a null check and a Debug.LogError, and organise the script into commented regions. Many experienced Unity developers do some of this, but hobby projects and game jam code are usually much rougher, with public fields and logic piled into Update. A sudden jump from the second style to the first is worth noticing.
Why C# produces false positives
Visual Studio and Rider generate constructors, properties, interface stubs and null checks through quick-actions, and dotnet format or an .editorconfig keeps every file consistent. Enterprise codebases that follow Microsoft's guidance closely can look exactly like the list above. Compare the snippet with the rest of the project before reading much into the score, and ask the author to walk through one design decision, such as why a given interface exists.
Read more
- Java AI code detector — for the closest sibling language.
- Detecting AI-generated code in pull requests — for team code review.
- How to tell if code was written by ChatGPT — the general checklist.
Frequently asked questions
Does it work on Unity scripts?
Yes. Paste the MonoBehaviour or ScriptableObject as it is. Unity code has its own conventions, and the analysis reads them as C#.
Will code produced by Visual Studio or Rider templates be flagged?
Templates and quick-fixes write a lot of C# for you, and that code can look generated. If the stated reasons are about constructors, properties or using directives that the IDE adds automatically, treat the score as weak.
Can it tell C# from Java?
Yes. Auto-detect separates them in almost every case. For a very short snippet you can choose C# from the menu to be sure.
How much code should I paste?
A whole class, or a method with the fields and interfaces it depends on. Short property declarations carry no style worth reading.
Is my C# code stored?
No. The snippet goes to a third-party AI model provider (Groq, with Google Gemini as a fallback) for the analysis and the result comes straight back to you. We do not save the code or write it to our logs.