I need to fetch all the properties of an anonymous type which can be written to. eg: var person = new {Name = \"Person\'s Name\", Age = 25};
What is wrong with this code-snippet? class Program { static void Main(string[] args) { var obj = new { Name = \"A\", Price = 3.003 };
When i declare object o = new { name = \"Bruce\",Age=21 }; Console.WriteLine(\"name={0},age={1}\"开发者_运维知识库,???,??? );
I have a list of Countries and i would like to separately get the name of the country and the CountryID.
I want to return an anonymous type over WCF. Is this poss开发者_C百科ible?You cannot use anonymous types, but maybe you are talking about WCF and untyped messages?
This question already has an answer here: How do I use a C# keyword as a property name? (1 answer) Closed 1 hour ago.