I think I'm going mad, someone please reassure me.
public class MyFile
{
public static byte[] ReadBinaryFile(string fileName)
{
return File.ReadAllBytes(fileName);
}
public static void WriteBinaryFile(string fileName, byte[] fileContents)
{
File.WriteAllBytes(fileName, fileContents);
}
}
People keep on adding code like the above in to our code base, surely this is wrong and horrid and I am doing the world a favour by deleting it and replacing all (or both in this case...) references to it with the internal code.
Is there any real justification for this kind of thing? Could I be missing the bigger picture? We are quite YAGNI-centric in our team and this seems to fly in the face of that. I could understand if this was the beginnings of something more, however this code has lay dormant for many many months until I tripped over it today. The more I search the more I find.