Practice · 1 of 2
Emit clean generated source
CHALLENGE
Difficulty: advanced+25 XP
Implement static string EmitDto(string className, (string Name, string Type)[] fields) returning a complete, compilable C# source string for public sealed record {className}(...) with the given fields — using FULLY QUALIFIED types for non-primitives (e.g. System.DateTime) so the output compiles without any usings. Primitives (int, string, bool, double) stay as-is.
Press Submit to check your solution.
Back to lesson: Practice: Generator drills