How would I convert this line from C++ to C#?
std::ifstream in;
in.exceptions(std::ios_base::badbit); //*THIS LINE*
According to this page, the previous line of code sets a new exception mask for the stream and clears any current error state flags. I'm also guessing that it is the "second form" of std::ios::exceptions
from the page linked above.
Because of my inexperience with C#'s FileStream
class, I've been getting pretty confused due to the lack of anything similar.