Learn Unity Roadmap/C# Essentials switch Topic 29 of 30 in C# Essentials3 code examples2 exercises Use switch when one variable controls many discrete outcomes. It is clearer than long if/else if chains for states and modes. More in C# EssentialsData TypesControl FlowMethodsClasses & ObjectsConstructorsPropertiesAccess ModifiersInheritanceOperatorsLoopsArraysLists & CollectionsInterfacesAbstract ClassesEnumsStructsGenericsDelegates & EventsLambda ExpressionsLINQAsync & AwaitIntfloatboolcharIfelseelse ifswitchPrimitive Data Types Previouselse if NextPrimitive Data Types All 157 topics in the Learn Unity Roadmap