Sunday, December 12, 2004

I wish VBnet had this

Dim someText As String

Text TO someText

Anything I type in here is placed into
the someText variable at runtime. No
more dealing with " & _

But that would be WAY too convenient.

End Text

(Yes, I ripped this off of VFP)

5 comments:

Anonymous said...

Wouldn't it be nicer if this kind of syntax would then extract all the text and place it into a resource file for you. A resource file you could localize?

Text TO SomeText
My (localizable) resource text
End Text

Oh! and while we're at it, how about {tab} and {crlf} tags for the String.Format function? {tab} and {crlf} tags in String.Format

Beth Massi said...

That would be cool. All I really wanted it for is SQL statements.

Rick Strahl said...

There's always C#:

string Sql =
@"select * from Customers
where Company = '%W'
ORDER BY Company";


:)

Beth Massi said...

C# still gets clumsy when you want to format with line breaks and insert values like << date >>.

Rick Strahl said...

Actually C# does the linebreaks just fine. No doubt the VFP version is much slicker but with a combination of string.Format() and the C# syntax it goes a long way towards TextMerge we know from VFP... And it's a lot more efficient than VFP's version dumping to disk