IndexOf is an extension method (default functionality can be overridden) on string.
Method will return index number of a character position in string.
Take a look in this example
We are expecting to see 1 in Console.
If character does not exist in the string method will return -1.
Above method will return -1.
Method will return index number of a character position in string.
Take a look in this example
public static void Main() { var character = "ABS"; Console.WriteLine(character.IndexOf("B")); }
We are expecting to see 1 in Console.
If character does not exist in the string method will return -1.
public static void Main() { var character = "ABS"; Console.WriteLine(character.IndexOf("F")); }
Above method will return -1.
I like the information. Good work and keep update more.
ReplyDeleteManual Testing Training in Chennai
Manual Testing Training institute in Chennai
Manual Testing Training in Tambaram
Mobile Testing Training in Chennai
mobile automation testing training in chennai
Drupal Training in Chennai
Photoshop Classes in Chennai
Photoshop Course in Chennai
I would definitely thank the admin of this blog for sharing this information with us. Waiting for more updates from this blog admin.
ReplyDeleteSalesforce Course in Chennai
salesforce training institute in chennai
PHP Training in Chennai
ReactJS Training in Chennai
gst classes in chennai
ux design course in chennai
Web Designing Course in Chennai
It is really useful for getting more information.
ReplyDeletesoftware testing and its types
what's new in angular 5
what is python used for at google
ccna cloud
data science interview questions and answers
Mua vé tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ bao nhiêu
chuyến bay thẳng từ mỹ về việt nam
các đường bay từ canada về việt nam
bay nhật việt
vé máy bay từ hàn quốc sang việt nam
Vé máy bay từ Đài Loan về VN