ToCharArray
List<string> list1; List<string> list2;
if (list1[0][0] == list2[0][0]) { //first chars of first elements are equal }
if(list1[0].ToString().ToCharArray()[0] == list2[0].ToString().ToCharArray()[0])) { //chars are equal } else { //are not }
String
ListItem1.SelectedItem.Text.ToCharArray()[0]
List<string> lst1 = new List<string> { "string1" }; List<string> lst2 = new List<string> { "string2" }; if (lst1.First()[0] == lst2.First()[0]) { } </string></string></string></string>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)