Is there a way to enter all cases in a switch statement?

Is there a way to enter all cases in a switch statement?

I'm working with a switch statement that sets certain properties of an object dependent on a case - a new requirement has came in to add a case statement 'All' to essentially execute all the cases to apply all the fields - used in exceptional cases.

I'm working with a switch statement that sets certain properties of an object dependent on a case - a new requirement has came in to add a case statement 'All' to essentially execute all the cases to apply all the fields - used in exceptional cases.

I can't really find a nice solution around this, each case statement is only setting 1-2 property values so it wouldn't be worth separating the logic into methods. However, I also don't want to have a load of duplicate code.

        var person = new Person();
        switch (PersonEnum)
        {
            case PersonEnum.Name:
                person.Name = ...
                break;
            case PersonEnum.Age: 
               person.Age = ...
               break;
             case PersonEnum.All:
               person.Name = ...         
               person.Age = ...
               break;

The example code above is a far more simplified version of what I'm dealing with, but the idea still applies.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Variable Introduction in C#[Bangla]

LIKE | COMMENT | SHARE | SUBSCRIBE A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C# has a speci...

Taking Input From User In C#[Bangla]

LIKE | COMMENT | SHARE | SUBSCRIBE In C#, the simplest method to get input from the user is by using the ReadLine() method of the Console class. However, Rea...