C
C#6mo ago
cow

Is there a tool to view c# generated code but still at high level?

Example, if I have:
public readonly record struct Point(double X, double Y, double Z);
public readonly record struct Point(double X, double Y, double Z);
I want to view what this translates/generates to, e.g:
public record struct Point
{
public double X { get; init; }
public double Y { get; init; }
public double Z { get; init; }
}
public record struct Point
{
public double X { get; init; }
public double Y { get; init; }
public double Z { get; init; }
}
I tried LINQPad, but it's giving me a low-level translation like the attached screenshot
No description
5 Replies
Jimmacle
Jimmacle6mo ago
https://sharplab.io/ is one option
SharpLab
C#/VB/F# compiler playground.
cow
cow6mo ago
That's great thanks. Looks to be the same as what LinqPad was calling "C# 1.0", but the format is much easier for me to understand
Buddy
Buddy6mo ago
VS and JetBrains Rider has IL Viewer(s)
ogarvey
ogarvey6mo ago
JetBrains
dotPeek: Free .NET Decompiler & Assembly Browser by JetBrains
dotPeek is a free tool based on ReSharper. It can reliably decompile any .NET assembly into C# or IL code.
Want results from more Discord servers?
Add your server