Help! I need help about monoString

MR Clark0200

Rookie
Mar 5, 2023
2
2
3
29
pakistan
public int GetCount(string itemName)
{
// Assume you have an array or list of items
Item[] items = GetItems();

// Loop through the items and count the ones with the matching name
int count = 0;
foreach (Item item in items)
{
if (item.Name == itemName)
{
count++;
}
}

return count;
}
 

FarmMods

Platinian
Original poster
Mar 6, 2023
6
0
1
29
Usa
public int GetCount(string itemName)
{
// Assume you have an array or list of items
Item[] items = GetItems();

// Loop through the items and count the ones with the matching name
int count = 0;
foreach (Item item in items)
{
if (item.Name == itemName)
{
count++;
}
}

return count;
}
How to string coin ??