DbFmt etc.

Jul 28, 2012 at 12:08 PM
Edited Jul 28, 2012 at 12:09 PM

I would suggest to change the specific DbFmt and DtFmt functions to just "Format()" and simply delegate the funtionality to String.Format(). This would allow automatically for all known data types as parameters and a known syntax to the formatting. A problem could be here: the used enclosing # signs. They are also used by String.Format so it must be somehow "encoded" or mask.

What was the reason  you choosed "#" as the general variable markers and not e.g. "$" ?

Coordinator
Nov 8, 2012 at 2:40 PM

Hi!! Thanks a lot for your suggestion and my appologies for replying so late... I've been working a lot and did not pay much attention to this project lately.

I must tell you than the "#" marker is not hard-coded. The user can customize using a property. 

There's no special reason for choosing "#" instead "$" other than my own ignorance. I started this project a long time ago, as a hobby without much knowledge in building components like this. :) That's the reason.

Perhaps I should change the default delimiter.  Also, at that time it was easier for me to identify "fields" delimited with a certain character at the header and at the trailer, like this: #myField# but it could be $myField$ too. The important fact is that you can change that to what you prefer.

I will also review the Format suggestions. If I make the change I will mantain the current functions for backward compatibility.

Thanks.