Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there any way to write long strings in VB.NET?
Message
From
16/02/2012 15:07:53
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01535583
Message ID:
01535599
Views:
61
>You could use + but almost certainly better to use the StringBuilder class...

String VS StringBuilder is a choice I always consider with care. Putting everything into a string, depending on the lenght of the string, might slow down consideraly the response time from a Web server. This is something I have experienced four years ago when building the pages that are returning the lists. When dumping everything into a string, once a certain limit is reached, this makes the Web server crawl. For that, StringBuilder is definitely the way to go. Using it for just a few lines turns out to be overkill as using a string would still be much faster.

It is just a question of evaluating the content that has to be put in it.

In this thread, I think Naomi was mostly focusing on the equivalent of C# to avoid concatenating several lines when definining a value for a string.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform