Click here to Skip to main content
15,921,028 members
Home / Discussions / C#
   

C#

 
QuestionGet Decimal value from an sql 2000 Database Pin
i-p-g-i24-Sep-06 23:49
i-p-g-i24-Sep-06 23:49 
AnswerRe: Get Decimal value from an sql 2000 Database Pin
Christian Graus24-Sep-06 23:54
protectorChristian Graus24-Sep-06 23:54 
GeneralRe: Get Decimal value from an sql 2000 Database Pin
i-p-g-i24-Sep-06 23:58
i-p-g-i24-Sep-06 23:58 
QuestionHow to Use __LINE__ & __FUNCTION__ in C# Pin
asishpatnaik24-Sep-06 22:58
asishpatnaik24-Sep-06 22:58 
AnswerRe: How to Use __LINE__ & __FUNCTION__ in C# Pin
Nader Elshehabi24-Sep-06 23:14
Nader Elshehabi24-Sep-06 23:14 
GeneralRe: How to Use __LINE__ & __FUNCTION__ in C# Pin
asishpatnaik25-Sep-06 1:01
asishpatnaik25-Sep-06 1:01 
AnswerRe: How to Use __LINE__ & __FUNCTION__ in C# Pin
Nader Elshehabi25-Sep-06 1:25
Nader Elshehabi25-Sep-06 1:25 
QuestionHow do you read the end of an XML file in C#? Pin
bigove24-Sep-06 22:55
bigove24-Sep-06 22:55 
I have a program that cycles through an XML file and outputs to another file every 1000 records. Thyis works fine until the end of the XML file is reached, when it fails saying my 'root' tag is not closed - although it does for the previous files. It seems to be having issues with recognising the end of the XML file, so can someone please confirm how this is done? Currently I have a while loop to do this, with a for loop inside to cycle through the records, ie:

while (XmlReader.Read())
{
...

for (int i = 1; i <= 100; i++)
{
while (reads in a node here)
{
does the work
}
}

Close the XmlReader and XmlWriter
}

This works fine for the beginning, until the end of the file is reached; is my way of reading the XML file correct (I have also tried XmlReader != null), or is there a better way?

Many thanks.
AnswerRe: How do you read the end of an XML file in C#? Pin
Ed.Poore24-Sep-06 23:04
Ed.Poore24-Sep-06 23:04 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove24-Sep-06 23:52
bigove24-Sep-06 23:52 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore25-Sep-06 0:36
Ed.Poore25-Sep-06 0:36 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove25-Sep-06 1:58
bigove25-Sep-06 1:58 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore25-Sep-06 2:08
Ed.Poore25-Sep-06 2:08 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove25-Sep-06 2:55
bigove25-Sep-06 2:55 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore25-Sep-06 4:54
Ed.Poore25-Sep-06 4:54 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove25-Sep-06 5:24
bigove25-Sep-06 5:24 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore25-Sep-06 6:13
Ed.Poore25-Sep-06 6:13 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore25-Sep-06 6:15
Ed.Poore25-Sep-06 6:15 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove25-Sep-06 22:13
bigove25-Sep-06 22:13 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore25-Sep-06 23:28
Ed.Poore25-Sep-06 23:28 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove25-Sep-06 23:44
bigove25-Sep-06 23:44 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore26-Sep-06 0:03
Ed.Poore26-Sep-06 0:03 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove26-Sep-06 0:20
bigove26-Sep-06 0:20 
GeneralRe: How do you read the end of an XML file in C#? Pin
Ed.Poore26-Sep-06 0:25
Ed.Poore26-Sep-06 0:25 
GeneralRe: How do you read the end of an XML file in C#? Pin
bigove26-Sep-06 0:36
bigove26-Sep-06 0:36 

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.