Methods

Methods (also called functions) are reusable blocks of code that perform a specific task. They are the primary way you organize logic in C#. Instead of writing the same damage calculation in 10 places, you write one method and call it wherever needed.

More in C# Essentials

  1. Data Types
  2. Control Flow
  3. Methods
  4. Classes & Objects
  5. Constructors
  6. Properties
  7. Access Modifiers
  8. Inheritance
  9. Operators
  10. Loops
  11. Arrays
  12. Lists & Collections
  13. Interfaces
  14. Abstract Classes
  15. Enums
  16. Structs
  17. Generics
  18. Delegates & Events
  19. Lambda Expressions
  20. LINQ
  21. Async & Await
  22. Int
  23. float
  24. bool
  25. char
  26. If
  27. else
  28. else if
  29. switch
  30. Primitive Data Types

All 157 topics in the Learn Unity Roadmap