© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
17 replies
Brady Kelly

Dynamically generating C# classes for deserializing data

I'm building a little service for reading large Parquet datasets into 'row' object collections for LINQ querying. So far I have been manually creating my 'row' classes, like one dataset is for junior school maths word problems, and I deserialize the Parquet rows into a collection of
WordProblem
WordProblem
objects.

Now I want to generalise the service and have it read a
ParquetSchema
ParquetSchema
from the dataset file, generate a class on the fly and deserialize into that. Second best, or maybe a better design, would be to statically generate class files. I'm using C#12 and .NET 8 with ParquetDotNet.

Claude has suggested some CLI tools and packages for static generation, and these libs I have no idea about, hence this question.

- Language Ext - This library allows defining data types based on a schema at runtime without pre-generated classes using LINQ projections.
- Siros - Provides dynamic and typed projection of data sources like Parquet into .NET objects.
- Misc.Extensions - A lightweight library with dynamic schema projection capabilities.

Then there are Roslyn code generators, which I should have learnt about yonks ago but haven't. Which is the current best practice way of doing this?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Deserializing binary data
C#CC# / help
3y ago
Classes in C#
C#CC# / help
12mo ago
Grpc.Tools generating camelCase classes
C#CC# / help
12mo ago
❔ C# abstract classes & interfaces
C#CC# / help
3y ago