Working in C# quiz

11. Which languages is C# similar to? Select the best answer.

C, C++, Java, JavaScript

12. When naming a class, record or struct, which naming convention should be used?

  • Pascal case
  • Snake case
  • All caps
  • Camel case

13. What are the benefits of using coding conventions? Select all that apply.

  • Coding conventions enable readers to understand the code more quickly by making assumptions based on previous experience.
  • Coding conventions provide boilerplate code so developers don’t have to create their own code.
  • Coding conventions facilitate copying, changing and maintaining the code.
  • Coding conventions create a consistent look to the code, so that readers can focus on content, not layout.

14. Which naming convention would you use when naming private or internal fields? Select the best answer.

  • Pascal case
  • Kebab case
  • Snake case
  • Camel case

15. What can be used to manage things that need to happen after a delay or over the course of time?

Coroutines

16. What are some of the useful features in the Unity Manual that you could use? Select all that apply.

  • Sample game design documents that you can use as templates
  • An index that allows you to search by topic
  • A button to switch between a specific topic in Unity Manual and Scripting API library
  • Ability to copy code samples

17. In which window can you attach a script to a GameObject?

  • Game
  • Hierarchy
  • Inspector
  • Scene

18. True or false? The component name, the class and the filename of the script should all have the same name. Select the best answer.

  • True
  • False

19. How do you enable or disable a component in Unity? Select the best answer.

  • Use the Escape button.
  • Use the enabled flag.
  • Use the Remove flag.
  • Use the Destroy function.

20. True or false? OnMouseDown detects a click on a Collider or a GUI text element. Select the best answer.

  • False
  • True

Leave a Reply