How to create that type of array dynamically in c#.
var data = new[] { new { Name = "China", Value = 1336718015 },
new { Name = "India", Value = 1189172906 },
};
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
Saroj Kumar SahuRank #1,766 · 849 reputationPosted Jun 10, 2015, 10:55 PM EDT
Rahul BansalRank #143 · 15.9K reputationPosted Jun 10, 2015, 10:59 PM EDT
Shuvojit HalderRank #2,827 · 503 reputationPosted Jun 10, 2015, 11:30 PM EDT
Najjaf Shuja39 reputationPosted Jun 11, 2015, 12:25 AM EDT
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Project1
{
class DynamicArray
public string Name
{
get
{
return name;
}
set
{
name= value;
}
}
private string value1;
public string Value1
{
get
{
return value1;
}
set
{
value1= value;
}
}
}