Answers for "how do you index a string in c#"

C#
2

c# find index of character in string

string str = "Now is the time.";
int index = str.IndexOf("h");
Posted by: Guest on March-05-2021
5

letter at index of string c#

string s = "hello";
char c = s[1];
// now c == 'e'
Posted by: Guest on July-01-2020

Code answers related to "how do you index a string in c#"

C# Answers by Framework

Browse Popular Code Answers by Language