When is it recommended to replace instances of String in Visual Basic 6.0 code to use StringBuilders in Visual Basic .NET?
If you are not modifying your strings or if you are concatenating small numbers, you might leave your strings as they are. If, on the other hand, you are performing many manipulations (concatenating, changing case, replacing/inserting characters, and so on), you might be better off changing your String instances to StringBuilders. By following this approach, you would be assured that your application will not suffer performance degradation due to String manipulation. In Visual Basic 6.0 and Microsoft Visual Studio .NET, strings are immutable. This means that whenever a string is declared and a value is assigned to it, the value that the string holds in memory never changes. The drawback is that you are using more memory than what you actually require to perform a simple task. String variables can be used when the stored values will not be changed frequently during the program execution. In cases where a fixed quantity of strings is concatenated, the usage of a String data type is appro
Related Questions
- How do I get information on Miami 21, the zoning code that is being developed and recommended for legislative action to replace the existing zoning ordinance?
- When is it recommended to replace String manipulation in Visual Basic 6.0 code with Regular Expressions in Visual Basic .NET?
- When is it recommended to replace instances of String in Visual Basic 6.0 code to use StringBuilders in Visual Basic .NET?