Hello All,
I want to create dynamic structure in c# language.
Requirement: I am reading column headers of table in one file (input file). With that headers i need to define structure in c#.
Now the problem is column headers of table may change. So i cannot fix the column headers as structure elements to define the structure.
So any one can help in this matter will be appreciated.
Thanks in Advance
Regards,
Jithendra Pasala

Jignesh TrivediPosted Sep 3, 2014, 12:05 AM
Hi,
Please refer
http://stackoverflow.com/questions/4991990/generating-a-struct-at-run-time-based-on-data-types-defined-in-a-string
In this link they provide solution to create structure run time using Reflection.
instead of structure you can also use dictionary but yes this is depending on your requirement...
hope this will help you.