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. Determing My Programs Directory

Determing My Programs Directory

Scheduled Pinned Locked Moved C#
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.
  • T Offline
    T Offline
    Tyrus182
    wrote on last edited by
    #1

    Hello I am writing a program that contains a class, the class needs to determine the directory of the program in order to save a file in the same directory as the .exe file. what do i need to do to get put the file im writing in the same directory as the exe.

    S T 2 Replies Last reply
    0
    • T Tyrus182

      Hello I am writing a program that contains a class, the class needs to determine the directory of the program in order to save a file in the same directory as the .exe file. what do i need to do to get put the file im writing in the same directory as the exe.

      S Offline
      S Offline
      Sean89
      wrote on last edited by
      #2

      Use Application.StatupPath;

      1 Reply Last reply
      0
      • T Tyrus182

        Hello I am writing a program that contains a class, the class needs to determine the directory of the program in order to save a file in the same directory as the .exe file. what do i need to do to get put the file im writing in the same directory as the exe.

        T Offline
        T Offline
        tarasn
        wrote on last edited by
        #3

        Use Application.StartupPath Property - the property returns the path for the executable file that started the application, not including the executable name. DevIntelligence.com - My blog for .Net Developers

        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