Maha

Maha

  • NA
  • 0
  • 324.9k

NP131 StringBuilder/character type

Aug 23 2008 8:57 AM

Hi Guys

 

NP131 StringBuilder/character type

 

This program is producing following result when ‘1’ in the Append() method is a character type (highlighted in yellow).

Please explain the reason.

 

myStringzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

  

Thank you

 

using System;

using System.Text;

 

class MainClass

{

    public static void Main()

    {

        StringBuilder myStringBuilder = new StringBuilder();

 

        myStringBuilder.Append("myString");

 

        myStringBuilder.Append('z', '1');

 

        Console.WriteLine(myStringBuilder);

    }

}


Answers (2)