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
  1. Home
  2. General Programming
  3. C#
  4. GetDetailsOf Efficiency

GetDetailsOf Efficiency

Scheduled Pinned Locked Moved C#
databaseperformance
3 Posts 3 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
    Ankit Rajpoot
    wrote on last edited by
    #1

    Hello Friends, I'm developing an application that reads file properties and stores them in a MS-Access database. I need to know, what would be more efficient in terms of speed, the GetDetailsOf method or the FileInfo and DirectoryInfo classes.

    S L 2 Replies Last reply
    0
    • A Ankit Rajpoot

      Hello Friends, I'm developing an application that reads file properties and stores them in a MS-Access database. I need to know, what would be more efficient in terms of speed, the GetDetailsOf method or the FileInfo and DirectoryInfo classes.

      S Offline
      S Offline
      Simon P Stevens
      wrote on last edited by
      #2

      Test them both and see. Write the two methods of reading the file properties Write a loop that repeats the file reading (say 1000) times. You need to do it lots of times because generally just doing it once will be so fast you can't time it accurately. Use a System.Diagnostics.Stopwatch to time the loop. Repeat for both types of file read.

      Simon

      1 Reply Last reply
      0
      • A Ankit Rajpoot

        Hello Friends, I'm developing an application that reads file properties and stores them in a MS-Access database. I need to know, what would be more efficient in terms of speed, the GetDetailsOf method or the FileInfo and DirectoryInfo classes.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Like the other reply said, make two versions. But I'd suggest using a profiler to make the comparison, if possible.

        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