S
S
Spartanec332021-07-15 21:47:04
C++ / C#
Spartanec33, 2021-07-15 21:47:04

How to display an image depending on the passed value?

I have 2 enum color and shape. Objects have fields in which values ​​from Enum. My code, when clicked, can get these values ​​​​in string. How can I output appropriate images depending on the values ​​received? Is there a way without using a switch to be easy to add to old enums and add new enums?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question