Wednesday 27 January 2016

C# - fix the following error - The best overloaded method match for 'string.Split(params char[])' has some invalid arguments

Watch this on YouTube:


The best overloaded method match for 'string.Split(params char[])' has some invalid arguments  
Argument 1: cannot convert from 'string' to 'char[]'


To fix it, replace
         string test = "";
         string test2 = test.Split("|")[0];

with
         string test = "";
            string test2 = test.Split('|')[0];






No comments:

Post a Comment