hey i want to return my whole string array but the program wants me to specify one
public string CreateCards( string[] Cards)
{
Cards = new string[52];
for (int a = 0; a <= 51; a++)
{
if (a <= 12)
{
Cards[a] = " Hjärter " + (a+1).ToString();
}
if (a > 12 && a <= 25)
{
Cards[a] = " Ruter " + (a-12).ToString();
}
if (a > 25 && a <= 38)
{
Cards[a] = " Spader " + (a-25).ToString();
}
if (a > 38)
{
Cards[a] = " Klöver " + (a-38).ToString();
}
}
return Cards; //i get wrong here saying i need to return an array and Cards[] wont work
//because they expect a value
}
i want to call this from another part of the program which you input a string array [52] and my method creates cards for it
Thank you for answers :)