I have this Enum:
public enum SIZE
{
Small = 0,
Medium = 1,
Large = 2,
}
I would like to use a C# switch expression but I am not sure how to create the "case" statements:
App.devWidth = App.width switch
{
};
What I want to be able to do is to set the width as follows:
Small = App.width < 700;
Medium = App.width >= 700 && App.width < 1200;
Large = App.width >= 1200;
Is there a way I can put these tests for app width on the left side of the "=>" in a switch?