/// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="data"></param>
        /// <param name="config"></param>
        /// <returns></returns>
        public string ConvertToString <T>(IEnumerable <T> data, DelimitedFileWriterConfig config = null)
        {
            if (config == null)
            {
                config = new DelimitedFileWriterConfig();
            }
            var objProperties = typeof(T).GetProperties();
            var sb            = new StringBuilder();

            if (config.WriteHeader)
            {
                sb.Append(GetHeader(objProperties));
            }
            sb.Append(WriteRows(data, objProperties));
            return(sb.ToString());
        }
        /// <summary>
        /// Create a file and fill in content with data. If file exists, then the original file will be overwritten.
        /// </summary>
        /// <param name="data">List of data with type of (T).</param>
        /// <param name="fileName"></param>
        /// <param name="config">Optional. By default, true, write header, which is a list of property names in type (T).</param>
        public void CreateFileWithData <T>(IEnumerable <T> data, string fileName, DelimitedFileWriterConfig config = null)
        {
            if (config == null)
            {
                config = new DelimitedFileWriterConfig();
            }
            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }
            var objProperties = typeof(T).GetProperties();

            if (config.WriteHeader)
            {
                var header = GetHeader(objProperties);
                File.AppendAllText(fileName, header);
            }
            File.AppendAllText(fileName, WriteRows(data, objProperties));
        }