C Sharp Strings Questions and Answers

Practice Mode
Showing 10 of 32 questions
Q31
Which method converts an object to its string representation?
  • A ToString()
  • B ToText()
  • C GetString()
  • D ConvertToString()
Answer: Option A
Explanation: ToString() is available on all objects and returns their string representation.
Q32
What does "ABC".ToCharArray() return?
  • A Character array
  • B Byte array
  • C String array
  • D Integer array
Answer: Option A
Explanation: ToCharArray() converts string to character array containing all characters.
Questions and Answers for Competitive Exams Various Entrance Test