Choose the effective stringBuilder method which helps in producing output for the following C# code? [code] static void Main(string[]

Choose the effective stringBuilder method which helps in producing output for the following C# code?
Code:
 static void Main(string[] args)
 {
     StringBuilder s = new StringBuilder("object");
     s./*______*/("Oriented Language");
     Console.WriteLine(s);
     Console.ReadLine();
 }
Output : objectOriented Language
A. Insert()
B. Add()
C. Append()
D. Join()
 
Answer: c
Explanation:
Code:
              static void Main(string[] args)
              {
               StringBuilder s = new StringBuilder("object");
               s.Append("Oriented Language");
               Console.WriteLine(s);
               Console.ReadLine();
               }
Output : objectOriented Language
 

Tìm kiếm

Back
Top