I made enum and tried to go through it with for-each loop and look for different cases using switch case and get values of dives used. ERROR I AM GETTING IS cannot implicitly convert type'console5.typeOfDevice' to 'string'
enum typeOfDevice
{
iphone=99,
android=59,
tablet=49
}
var usedDevice = Enum.GetNames(typeof(typeOfDevice));
foreach (string used in usedDevice)
{
switch (used)
{
case usedDevice.iphone: //gets error here
Console.Write($"enter how many time you used Iphone");
var input = Console.ReadLine();
break;
case usedDevice.android:
Console.Write($"enter how many time you used Android");
var input = Console.ReadLine();
break;
case usedDevice.tablet:
Console.Write($"enter how many time you used Tablet");
var input = Console.ReadLine();
break;
default:
break;
}
}