Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

vb.net - stringbuilder

Options
  • 10-07-2007 6:33pm
    #1
    Registered Users Posts: 938 ✭✭✭


    Trying to learn some vb but having some trouble understanding the stringbuilder class. From what I can tell, its purpose is to set a size
    on a string and allow easier manipulation of a string. Now when I
    try to do this

    Dim strexample as system.text.stringbuilder = "Test"

    I get an error value of type string cannot be converted to system.text.stringbuilder

    If I do this
    Dim strexample as system.text.stringbuilder("test")

    then I get a dimensionzing an array error.

    have I got this all wrong?


Comments

  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Dim strexample as system.text.stringbuilder = new stringbuilder("lewrklj")

    ???


  • Registered Users Posts: 938 ✭✭✭logic


    Thanks.....i'd left out the "new".

    Dim strexample As New System.Text.StringBuilder("lewrklj")


  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Check out google or irc.freenode.org when you hit little syntax errors :)


Advertisement