I have a program which is giving me a custom list of numbers 'NumberList'.
I converted that list into a custom array with the ultimate goal of converting it to an int array. However, the logic I am using is not letting me convert and giving me following error:
CS0411 C# The type arguments for method cannot be inferred from the usage. Try specifying the type arguments explicitly.
Can anyone please help me with this?
public static void Main(string[] args)
{
if (!string.IsNullOrEmpty(Btn()))
{
var manager = new NumberManager(Btn());
var res = manager.Execute();
NumberWith[] NWArray = manager.NumbersList.ToArray();
var intArray = Array.ConvertAll( NWArray, int.Parse);
}
}
NumberWith.NumberManaerandNumberWithlook like and more importantly what doesNumbersListreturn?Btn()called twice? Shouldn't you call once and cache the results?