MCQs > IT & Programming > C# > What is the output of the following code? class Test { static void Main() { string myString = '1 2 3 4 5' myString = Regex.Replace(myString, @'\s+', ' '); System.Console.WriteLine(myString); }

C# MCQs

What is the output of the following code?

 

class Test

{

   static void Main() {

   string myString = “1 2       3  4    5”

   myString = Regex.Replace(myString, @"\s+", " ");

   System.Console.WriteLine(myString);

}

Answer

Correct Answer: 1 2 3 4 5

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it