Thursday, October 25, 2012

Build My StringBuilder site helps your turn text into StringBuilder code

ASP.NET Forums - Automatic Stringbuilder code creation

Hi all,

I got so sick of manually building Stringbuilder objects around queries and and other text over the years that I built a utility that will do it for you:

Will do and c# (and java and c++, but you're hardly writing ASP.NET in either of those. And if you are, stop).


Wouldn't it be great to just paste your massive SQL query or other large block of text somewhere and then have a StringBuilder object magically form around it? (Answer: Yes it would be) Here you can automatically create StringBuilder objects. will take whatever text you input, escape your double quotes, escape your backslashes, and output automated StringBuilder code. If you find an issue or want to offer a change or enhancement idea, note it in the comments.



Now that's kind of neat (and something I think I can use soon... :)


jvongillern said...

here are two easy ways to do something similar: - Pixie makes it pretty easy to quickly format text.

Anonymous said...

I don't get it. If you've got the text, just stick it in a text file resource and call Properties.MyText. If you need to parameterise, call string.Format on it.