DEV Community

Jure
Jure

Posted on

How to avoid if-else statements, when choosing drives in combobox?

I'm trying to get rid of if-else statements in my function, so I don't need to specify every drive possible. In this case I'm reading a .csv file. Is there any way to avoid the struggle of if-else.

Thanks in advance!

My code now:

if (str == "(D:)")
{
    csvPath

Top comments (0)