Storing different type of element in Array in C#
How can we store different type of element in an array using C# ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ketan HiraparaRank #7,540 · 239 reputationPosted Dec 26, 2017, 6:36 AM EST
Amit KumarRank #459 · 5.4K reputationPosted Dec 26, 2017, 4:52 PM EST
Altaf AnsariRank #1,045 · 1.8K reputationPosted Dec 26, 2017, 6:59 PM EST
Dharmraj ThakurRank #577 · 4.2K reputationPosted Dec 26, 2017, 7:08 PM EST
You can use Tuples which is new feature of c# or .net.
For example:
var t1 = new Tuple
or
Ankur MistryRank #86 · 23.9K reputationPosted Dec 26, 2017, 8:45 PM EST