OK, now it makes some sense. My answer is the same. You can search the framework, or you can search CP articles. Most teams end up with a dll of methods they reuse, for example, Path.Combine is buggy to the point of being useless, so I use my own.
Manuellt wrote:
for Christian: maybe you will say File.ReadAllText();, but if read fails, you have to catch the error, it can be encapsulated in the method instead of your code.
That makes zero sense. To put the call to File.ReadAllText AND the error handling into a helper method, means writing a method that swallows the exception and always responds the same way. That is bad code.