We start from the simple question that why we need to create a log file in our application. Simple is that log file keep record of all transaction of data or tells us about the action that we done in application. It help us to recover all previous data. I read many forum related to coding from where I get the question, is there any kind of built in function or .dll in C# that maintains log file. So answer to that question is that there is no such a function or .dll that handle this event. For this purpose I will suggest that y u not make your own program that help you to create a log file.