Can streamreader change a file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PSiegmann@mail.nu

    Can streamreader change a file?

    Hello group,

    if I open with streamreader a file to read in that way:

    StreamReader sr = new StreamReader(c: \\test.txt,
    System.Text.Enc oding.GetEncodi ng(10000));

    Is it possible that it can change the file in any way? (Change the
    encoding of the actual file as example)
  • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    #2
    Re: Can streamreader change a file?

    PSiegmann@mail. nu wrote:
    if I open with streamreader a file to read in that way:
    >
    StreamReader sr = new StreamReader(c: \\test.txt,
    System.Text.Enc oding.GetEncodi ng(10000));
    >
    Is it possible that it can change the file in any way? (Change the
    encoding of the actual file as example)
    A StreamReader can not change the file itself (you can check the
    methods).

    If the file is opened in certain ways then other parts of the
    app can change the file the StreamReader is reading.

    Arne

    Comment

    Working...