xaml:
xaml.cs
List liststStringParsed = new List();
liststStringParsed.Add("a");
liststStringParsed.Add("b");
liststStringParsed.Add("c");
gTBxChar2 = liststStringParsed[2];
"gTBxChar2 = liststStringParsed[2]" is not acceptable.
How do I convert a list element to text?
Jignesh KumarPosted Nov 30, 2024, 10:26 AM
Hello,
You're missing the
.Textproperty for your input. Try the example below, and it should work. If you'd like to display all the items as a comma-separated string, you can usestring.Join()to combine the strings.Or
Mahesh ChandPosted Nov 29, 2024, 8:47 PM
string result = String.Join(",", liststStringParsed);
Here is a detailed article: How To Convert a List to a String in C#
https://www.c-sharpcorner.com/article/convert-list-of-strings-into-single-string/