Use the Remove() method to remove part of StringBuilder : StringBuilder « String « C# / CSharp Tutorial

C# / CSharp Tutorial
1. Language Basics
2. Data Type
3. Operator
4. Statement
5. String
6. struct
7. Class
8. Operator Overload
9. delegate
10. Attribute
11. Data Structure
12. Assembly
13. Date Time
14. Development
15. File Directory Stream
16. Preprocessing Directives
17. Regular Expression
18. Generic
19. Reflection
20. Thread
21. I18N Internationalization
22. GUI Windows Forms
23. 2D
24. Design Patterns
25. Windows
26. XML
27. ADO.Net
28. Network
29. Directory Services
30. Security
31. unsafe
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
C# / CSharp Tutorial » String » StringBuilder 
5. 20. 13. Use the Remove() method to remove part of StringBuilder
 

using System;
using System.Text;

class MainClass
{
  public static void Main()
  {
    StringBuilder myStringBuilder = new StringBuilder();
    myStringBuilder.Append("friends");
    
    myStringBuilder.Insert(2"friends, ");
    myStringBuilder.Insert(2"Romans, "3);
    Console.WriteLine("myStringBuilder = " + myStringBuilder);

    
    myStringBuilder.Remove(47);
    Console.WriteLine("myStringBuilder = " + myStringBuilder);

  }
}

        
5. 20. StringBuilder
5. 20. 1. Add formatted string to StringBuilder
5. 20. 2. Append('A ').Append('B ').Append('C... ')
5. 20. 3. Append string and insert string to a StringBuilder
5. 20. 4. Use StringBuilder to reverse a string
5. 20. 5. Set Length property of StringBuilder
5. 20. 6. StringBuilder: Length, Capacity, MaxCapacity
5. 20. 7. Use the Append() method to append two strings, an int, and a bool to StringBuilder
5. 20. 8. Use the Append() method to append a character to StringBuilder
5. 20. 9. Use the Append() method to append a substring to StringBuilder
5. 20. 10. Display the contents of StringBuilder
5. 20. 11. Use the AppendFormat() method to add a formatted string containing a floating point number to myStringBuilder
5. 20. 12. Use the Insert() method to insert strings into StringBuilder
5. 20. 13. Use the Remove() method to remove part of StringBuilder
5. 20. 14. Use the Replace() method to replace part of StringBuilder
5. 20. 15. Use the ToString() method to convert StringBuilder to a string
5. 20. 16. StringBuilder: append value with format
w___w__w__._j___a___v__a__2___s__._c_o___m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.