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. [Message Deleted]

[Message Deleted]

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

    [Message Deleted]

    S 1 Reply Last reply
    0
    • D DJ245

      [Message Deleted]

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

      Hi, what do you mean with program files? If these are text files, you could read the file into memory, overwrite the existing one, write your header using a StreamWriter, followed by writing the content of the file from memory. Regards Sebastian

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      D 1 Reply Last reply
      0
      • S SeMartens

        Hi, what do you mean with program files? If these are text files, you could read the file into memory, overwrite the existing one, write your header using a StreamWriter, followed by writing the content of the file from memory. Regards Sebastian

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        D Offline
        D Offline
        DJ245
        wrote on last edited by
        #3

        [Message Deleted]

        S 1 Reply Last reply
        0
        • D DJ245

          [Message Deleted]

          S Offline
          S Offline
          SeMartens
          wrote on last edited by
          #4

          So a class file is nothing more than a text file with a specific extension (e.g. cs). So you could use StreamReader/StreamWriter to add a header to each file.

          It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

          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