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"

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C# quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes