Code Trivia #7
- by João Angelo
Lets go for another code trivia, it’s business as usual, you just need to find what’s wrong with the following code:
static void Main(string[] args)
{
using (var file = new FileStream("test", FileMode.Create) { WriteTimeout = 1 })
{
file.WriteByte(0);
}
}
TIP: There’s something very wrong with this specific code and there’s also another subtle problem that arises due to how the code is structured.