c# stringbuilder
C#
using System;
using System.Text;
public sealed class App
{
static void Main()
{
// Create a StringBuilder that expects to hold 50 characters.
// Initialize the StringBuilder with "ABC".
StringBuilder sb = new StringBuilder("ABC", 50);
// Append three characters (D, E, and F) to the end of the StringBuilder.
sb.Append(new char[] { 'D', 'E', 'F' });
// Append a format string to the end of the StringBuilder.
sb.AppendFormat("GHI{0}{1}", 'J', 'k');
// Display the number of characters in the StringBuilder and its string.
Console.WriteLine("{0} chars: {1}", sb.Length, sb.ToString());
// Insert a string at the beginning of the StringBuilder.
sb.Insert(0, "Alphabet: ");
// Replace all lowercase k's with uppercase K's.
sb.Replace('k', 'K');
// Display the number of characters in the StringBuilder and its string.
Console.WriteLine("{0} chars: {1}", sb.Length, sb.ToString());
}
}
// This code produces the following output.
//
// 11 chars: ABCDEFGHIJk
// 21 chars: Alphabet: ABCDEFGHIJK
Also in C#:
- Title
- c# tab character
- Category
- C#
- Title
- how to get the last element in an array in c#
- Category
- C#
- Title
- c# replace string case insensitive
- Category
- C#
- Title
- loop gridcontrol devexpress c#
- Category
- C#
- Title
- c# getter setter
- Category
- C#
- Title
- The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.
- Category
- C#
- Title
- rotate player unity
- Category
- C#
- Title
- reference to gameobject in different scene unity
- Category
- C#
- Title
- what is type unity
- Category
- C#
- Title
- c#if
- Category
- C#
- Title
- c# MD5.Create returning nul
- Category
- C#
- Title
- c# how to exit program
- Category
- C#
- Title
- c# one line set
- Category
- C#
- Title
- configure 1 to 1 relation ef
- Category
- C#
- Title
- c# make request to rest api
- Category
- C#
- Title
- asking for user input integer c#
- Category
- C#
- Title
- C# assigning image location
- Category
- C#
- Title
- how to cjeck if a string has a word c#
- Category
- C#
- Title
- unity 2d top down movement
- Category
- C#
- Title
- c# input
- Category
- C#
- Title
- how to update a project to cross target .net core
- Category
- C#
- Title
- c# array to list
- Category
- C#
- Title
- move character unity
- Category
- C#
- Title
- how to select time and date in datetimepicker in c#
- Category
- C#
- Title
- c# split a string and return list
- Category
- C#
- Title
- create dropdown in datatable c# dynamically
- Category
- C#
- Title
- how to create a list in c# unity
- Category
- C#
- Title
- how consider the first caracter in Split c#
- Category
- C#
- Title
- unity 2d joystick controls
- Category
- C#
- Title
- unity material offset script
- Category
- C#
- Title
- how to make a datatable in c#
- Category
- C#
- Title
- add new page to site c# programmatically
- Category
- C#
- Title
- .net core download image from url binary file
- Category
- C#
- Title
- unity remove parent
- Category
- C#
- Title
- unity if gameobject exists
- Category
- C#
- Title
- convert string array to int C#
- Category
- C#
- Title
- how to disable a gameObject unity c#
- Category
- C#
- Title
- first person camera controller unity
- Category
- C#
- Title
- asp.net core task iactionresult
- Category
- C#
- Title
- how do i foreach c#
- Category
- C#
- Title
- c# distinct comparer multiple properties
- Category
- C#
- Title
- how to check if an integer is in array c#
- Category
- C#
- Title
- random from list c#
- Category
- C#
- Title
- sqlite connection c#
- Category
- C#
- Title
- Unity how to put IEnumerator in update and loop once with yeild return new waitforseconds
- Category
- C#
- Title
- c# md5 int
- Category
- C#
- Title
- c# string to memorystream
- Category
- C#
- Title
- asign only common fields in c# object
- Category
- C#
- Title
- c# Authorization has been denied for this request
- Category
- C#
- Title
- unity detect any key
- Category
- C#
- Title
- __dopostback
- Category
- C#
- Title
- unity hide mouse
- Category
- C#
- Title
- c sharp split by newline
- Category
- C#
- Title
- block wapalyzer from detecting codeigniter
- Category
- C#
- Title
- csharp datetime string format
- Category
- C#
- Title
- C# type cast float to string
- Category
- C#
- Title
- write last line txt file c#
- Category
- C#
- Title
- find mongodb c# with task T
- Category
- C#
- Title
- unity find object by name
- Category
- C#
- Title
- can send but cannot receive email dreamhost email
- Category
- C#
- Title
- check which activity in focus in android
- Category
- C#
- Title
- unity change the source image or image
- Category
- C#
- Title
- idbset sqlquery
- Category
- C#
- Title
- c sharp check if key in dictionary
- Category
- C#
- Title
- zip file ignoring directory starting with dot
- Category
- C#
- Title
- c# delegate return value invoke
- Category
- C#
- Title
- Assets\playermove.cs(30,37): error CS1003: Syntax error, ',' expected
- Category
- C#
- Title
- invalidoperationexception c# ui thread
- Category
- C#
- Title
- start a particle effect when a button is pushed
- Category
- C#
- Title
- c# reverse a string for loop
- Category
- C#
- Title
- F# convert generic.List to list
- Category
- C#
- Title
- c# directories loop
- Category
- C#
- Title
- remove first object from list c#
- Category
- C#
- Title
- get type of variable c#
- Category
- C#
- Title
- how to clear console through script unity
- Category
- C#
- Title
- c# abstract class
- Category
- C#
- Title
- how to go to other forms in C#
- Category
- C#
- Title
- c# how to refreshyour bindingsource
- Category
- C#
- Title
- c# get country code
- Category
- C#
- Title
- c# get time
- Category
- C#
- Title
- unity rotate towards mouse
- Category
- C#
- Title
- convert int to double c#
- Category
- C#
- Title
- C# loop through array of objet
- Category
- C#
- Title
- letter at index of string c#
- Category
- C#
- Title
- c# query string builder
- Category
- C#
- Title
- create object in c#
- Category
- C#
- Title
- round vector3 unity
- Category
- C#
- Title
- unity docs player input
- Category
- C#
- Title
- c# filesystemwatcher double events
- Category
- C#
- Title
- how to convert iformfile to byte array c#
- Category
- C#
- Title
- abstract class c#
- Category
- C#
- Title
- how to close a windows form application in c#
- Category
- C#
- Title
- onmouseclick unity
- Category
- C#
- Title
- cannot apply indexing with to an expression of type 'object'
- Category
- C#
- Title
- Request.ServerVariables["HTTP_X_FORWARDED_FOR"] get only one ipaddress
- Category
- C#
- Title
- 2d character controller unity
- Category
- C#
- Title
- c# clone stream
- Category
- C#
- Title
- check if enabled unity
- Category
- C#
- Title
- get waht is differnt between two arrays c#
- Category
- C#
- Title
- unity timer
- Category
- C#