String.format

activities

#1

Hi,
can anyone help me to solve this question from one of the lesson test?
The String.Format(“Input = {0} and Output = {1}”, “1”,”2”) expression returns the following text:
Options are as below:
1.Input = {0} and Output = {1}
2.Input = 1 and Output = 2
3.Input = 0 and Output = 0
4.Input = 1 and Output = 1


#2

This is the answer.

Regards
Balamurugan


#3

can you explain that?I’m not getting how this string.format method works…


#4

Hi @kirti21,

Check these links…

http://www.visual-basic-tutorials.com/beginner/Formatting-Strings.html
https://msdn.microsoft.com/en-us/library/system.string.format(v=vs.110).aspx
https://www.dotnetperls.com/format-vbnet

Regards
Balamurugan