How many objects of the string type will be created during the following code execution?
  string s = "sdfsg"; 
  if(s.ToLower().Substring(1,2).EndsWith("exe")); 
Explanation
1. "sdfs"
2. We be created as a result of the s.ToLower ()
3. We be created as a result of the .Substring ()
4. "exe"
C#
C# Quiz
Start Quiz

or Read more about C# Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback