Click here to Skip to main content
15,885,435 members
Home / Discussions / C#
   

C#

 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
sushantpokharel28-Jul-10 20:46
sushantpokharel28-Jul-10 20:46 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Member 315345731-Jul-10 18:08
Member 315345731-Jul-10 18:08 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
Member 315345731-Jul-10 18:12
Member 315345731-Jul-10 18:12 
AnswerRe: How come I get a rounded number when I multiply doubles?? Pin
kxal8-Aug-10 18:25
kxal8-Aug-10 18:25 
Questionusing telerik schedule Pin
mrkeivan27-Jul-10 3:54
mrkeivan27-Jul-10 3:54 
AnswerRe: using telerik schedule Pin
Wes Aday27-Jul-10 4:10
professionalWes Aday27-Jul-10 4:10 
GeneralRe: using telerik schedule Pin
mrkeivan27-Jul-10 19:33
mrkeivan27-Jul-10 19:33 
QuestionQuick Linq to XML question Pin
xkrja27-Jul-10 3:05
xkrja27-Jul-10 3:05 
I'm starting out with linq to xml and have a quick question:

I have the following xml-file:

<countries>
<country code="AF" iso="4">Afghanistan</country>
<country code="AL" iso="8">Albania</country>
<country code="DZ" iso="12">Algeria</country>
<country code="AS" iso="16">American Samoa</country>
<country code="AD" iso="20">Andorra</country>
.
.
.

How can I get a result containing all the country names by using a linq expression? I tried the following but it only gives me "Afghanistan":

XDocument xmlDoc = XDocument.Load("countries.xml");

var countries = from country in xmlDoc.Descendants("countries")
select new
{
Name = country.Element("country").Value,
};

Thanks for help!
AnswerRe: Quick Linq to XML question Pin
Chris Trelawny-Ross27-Jul-10 5:26
Chris Trelawny-Ross27-Jul-10 5:26 
AnswerRe: Quick Linq to XML question Pin
souidi abderrahman27-Jul-10 21:47
souidi abderrahman27-Jul-10 21:47 
QuestionFetch the content of a website Pin
Krishna Varadharajan27-Jul-10 1:55
Krishna Varadharajan27-Jul-10 1:55 
AnswerRe: Fetch the content of a website Pin
Peace ON27-Jul-10 2:17
Peace ON27-Jul-10 2:17 
GeneralRe: Fetch the content of a website Pin
Krishna Varadharajan27-Jul-10 2:47
Krishna Varadharajan27-Jul-10 2:47 
AnswerRe: Fetch the content of a website Pin
Peace ON27-Jul-10 2:53
Peace ON27-Jul-10 2:53 
GeneralRe: Fetch the content of a website Pin
Krishna Varadharajan27-Jul-10 3:11
Krishna Varadharajan27-Jul-10 3:11 
GeneralRe: Fetch the content of a website Pin
Pete O'Hanlon27-Jul-10 3:01
mvePete O'Hanlon27-Jul-10 3:01 
GeneralRe: Fetch the content of a website Pin
Bernhard Hiller28-Jul-10 21:51
Bernhard Hiller28-Jul-10 21:51 
AnswerRe: Fetch the content of a website Pin
Pete O'Hanlon27-Jul-10 3:02
mvePete O'Hanlon27-Jul-10 3:02 
GeneralRe: Fetch the content of a website Pin
Krishna Varadharajan27-Jul-10 3:14
Krishna Varadharajan27-Jul-10 3:14 
QuestionHow can i convert text file to pdf file? Pin
sush827-Jul-10 1:04
sush827-Jul-10 1:04 
AnswerRe: How can i convert text file to pdf file? Pin
N a v a n e e t h27-Jul-10 1:12
N a v a n e e t h27-Jul-10 1:12 
AnswerRe: How can i convert text file to pdf file? [modified] Pin
PIEBALDconsult27-Jul-10 7:19
mvePIEBALDconsult27-Jul-10 7:19 
AnswerRe: How can i convert text file to pdf file? Pin
souidi abderrahman27-Jul-10 21:50
souidi abderrahman27-Jul-10 21:50 
QuestionHow can i read pdf file in .net? Pin
sush826-Jul-10 23:00
sush826-Jul-10 23:00 
AnswerRe: How can i read pdf file in .net? Pin
Peace ON27-Jul-10 0:49
Peace ON27-Jul-10 0:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.