Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. diffrent results everytime

diffrent results everytime

Scheduled Pinned Locked Moved C#
helpcsharpjavascriptxmlquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahmed Galal
    wrote on last edited by
    #1

    i wrote a simple line of code that retrives a value from a static XML file but my problem that it returns diffrent result every time it runs, the line is: string asd = VoteData.DocumentElement.ChildNodes[1].ChildNodes[1].InnerText; maybe that happen coz the file is not completely loaded , i'm using C# but i don't found any method that let me know if the file is completely loaded or not, i know that theres a function in javascript which is : readyState that do the job, but i can't found any in C#, can anyone help ? thanx in advance.

    C 1 Reply Last reply
    0
    • A Ahmed Galal

      i wrote a simple line of code that retrives a value from a static XML file but my problem that it returns diffrent result every time it runs, the line is: string asd = VoteData.DocumentElement.ChildNodes[1].ChildNodes[1].InnerText; maybe that happen coz the file is not completely loaded , i'm using C# but i don't found any method that let me know if the file is completely loaded or not, i know that theres a function in javascript which is : readyState that do the job, but i can't found any in C#, can anyone help ? thanx in advance.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If your XML file does not change, then I don't see why this would differ. You should really be using an XPath to find the node you want though, this way is incredibly clunky. If the document was not fully loaded, it would not be valid XML, and none of this would work. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups