StringBuilder

  • Thread starter Thread starter Paddy
  • Start date Start date
P

Paddy

An code example says

StringBuilder x = new StringBuilder();

This will not compile,
please comment.

Paddy
 
any error? did you had the necessary "using" statement?
//***
using System.Text;
//***
 
You need to import System.Text via the 'using' statement, or use
System.Text.StringBuilder to refer to the class.

The comment is that if you do not have a 'using' statement for the namespace
a class is located in, you have to use the fully qualified name of the
class.
 
Make sure you have using System.Text; up top, or do
System.Text.StringBuilder x = new System.Text.StringBuilder()
 
Back
Top