What kind of solution is to avoid default statement in switch ,if it is possible?Regards

Hi

Why would you want to avoid a default statement? Do you have some code to demonstrate what you mean and why you would want to do this?

One way of avoiding a default statement in a switch is to simply not have one. What result that will have on your logic however is unclear without seeing some code.

Use if-else if-else if etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.