Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. string and string builder class

string and string builder class

Scheduled Pinned Locked Moved Visual Basic
performance
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amaneet
    wrote on last edited by
    #1

    Sir/Madam, Please explain the basic difference between string and string builder class.I know one difference is , string builder variable is gets the dynamic memory and string class not. Thanks.

    R 1 Reply Last reply
    0
    • A amaneet

      Sir/Madam, Please explain the basic difference between string and string builder class.I know one difference is , string builder variable is gets the dynamic memory and string class not. Thanks.

      R Offline
      R Offline
      RenuKhot
      wrote on last edited by
      #2

      String builder variable is preferred over string variable, when there is a need to store a larger string and also when you need to create any string value by appending to the same variable. In such a case, when we consider a string variable, when we reassign any value to a string variable, it allocates NEW memory location along with the new char whatever we appended. hence every time we reassign to a string variable, memory allocations increase and thus affects the performace, where as in case of string builder this is not the case and hence preferred.

      Renu.K

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups