Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9212283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:29:20+00:00 2026-06-18T01:29:20+00:00

I was reading File.AppendAllText method from msdn http://msdn.microsoft.com/en-us/library/ms143356.aspx I saw they have listed FileNotFoundException

  • 0

I was reading File.AppendAllText method from msdn

http://msdn.microsoft.com/en-us/library/ms143356.aspx

I saw they have listed FileNotFoundException to possible exceptions list for the method but according to there description about method on the same page

Opens a file, appends the specified string to the file, and then closes the file.
If the file does not exist, this method creates a file,
writes the specified string to the file, then closes the file.

this part

If the file does not exist, this method creates a file

it seems this exception can never be thrown for this method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:29:22+00:00Added an answer on June 18, 2026 at 1:29 am

    If you take a look at (say) Mono’s implementation (which is compatible with Microsoft’s), all File.AppendAllText ends up doing (argument checks aside) is creating a StreamWriter with your path and calling a Write on that object.

    Neither the used constructor nor the method are listed anywhere to throw a FileNotFoundException, as far as I can tell, so it might be a documentation error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got an logical bug from winpcap library in reading file from offline
While implementing XML file reading/writing in my application I saw that when I call
I'm reading a file using bufferedreader, so lets say i have line = br.readLine();
I am reading a file byte-by-byte. Say for example i have this byte: 0x41
I am reading one file using ruby in which I have written regexp in
I am reading file from ResultSet and it's required to save file into Oracle
I am reading in pipe delimitated text in from a flat file and am
I have some trouble reading file in Java. What a file looks like: Answer
How to start reading file from 2nd line skipping 1st line. This seems to
I am reading a CSV file and have some values like field 1 field

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.