c# - The best overloaded method match for 'string.Join(string, string[])' has some invalid arguments -
i want extract come text between 2 tags. "txtreadfile" contains many tags. want extract text in each occurrence of tag.
i used next code. when ran it, gives error:
error # error1 "the best overloaded method match 'string.join(string, string[])' has invalid arguments" error # "argument '2': cannot convert 'system.collections.generic.list<string>' 'string[]' "
can help me debug it?
list<string> destlist = new list<string>(); string me = " <ts>(.*?)<t>"; string text =txtreadfile.text; foreach (match match in regex.matches(text, me)) destlist.add(match.groups[1].value); string output= string.join(" ", destlist); messagebox.show(output);
try with:
string output = string.join(" ", destlist.toarray());
c# regex
No comments:
Post a Comment