Bird
0
0

Which of the following is the correct syntax to convert a string text to lowercase in C#?

easy📝 Syntax Q3 of 15
C Sharp (C#) - Strings and StringBuilder
Which of the following is the correct syntax to convert a string text to lowercase in C#?
Atext.Lower()
Btext.ToLower()
CToLower(text)
Dtext.toLower()
Step-by-Step Solution
Solution:
  1. Step 1: Recall method naming conventions in C#

    Methods in C# are PascalCase, so ToLower() is correct.
  2. Step 2: Check method usage on string instance

    ToLower() is called on the string variable, so text.ToLower() is correct syntax.
  3. Final Answer:

    text.ToLower() -> Option B
  4. Quick Check:

    Lowercase conversion = ToLower() [OK]
Quick Trick: Use PascalCase methods like ToLower() in C# [OK]
Common Mistakes:
MISTAKES
  • Using lowercase method names
  • Calling ToLower as a function
  • Using non-existent Lower() method

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes