Is There A Way To Apply CODE Formatting To A VB.Net TextBox?

Posted by Jeff on Stack Overflow See other posts from Stack Overflow or by Jeff
Published on 2010-05-28T14:13:50Z Indexed on 2010/05/28 14:22 UTC
Read the original article Hit count: 172

Filed under:
|

I'm playing with a simple string replacement editor for editing VB.Net functions outside of VB. Is there a way to apply VB.Net code formatting to a string?

For example. The txtboxCodeEntry looks like this:

If strVar="dummy" then 1 else 0 Endif

I would like it to "autoformat" to:

If strVar = "dummy" Then
   1
Else
   0
End If

The formatting would match whatever formatting VB.Net does when you're editing code in the Visual Studio IDE.

Thanks.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about formatting