HEIGHT ABOVE SEA LEVEL
  • Articles
  • Quizzes
Join Patreon

Feeling Streaky?

You're currently on a 0-day streak. Come back tomorrow to start one.

0

Suggested

    Become a Patreon member and receive:

    • 20+ articles ad-free

    • 100+ exclusive videos on C# and how to use Unity

    • 40+ cheat sheets on all things game development

    • 2 Custom Visual Studio Themes

    • 2-day early access to articles and YouTube videos

    Join Patreon
    • Articles
    • Quizzes
    Join Patreon

    Here's some dummy text to automatically resize the container as if there were actual text

    Here's some dummy text to automatically resize the container as if there were actual text

    Here's some dummy text to automatically resize the container as if there were actual text

    Here's some dummy text to automatically resize the container as if there were actual text

    Become a patreon member and receive the following:

    HEIGHT ABOVE SEA LEVEL
    • Articles
    • Quizzes
    Join Patreon

    Feeling Streaky?

    You're currently on a 0-day streak. Come back tomorrow to start one.

    0

    Suggested

    • top youtube channels header imageTop YouTube Channels for Aspiring Unity Game DevelopersOctober 2, 2025
    • A Game Developer's Guide to Numbers in C#October 2, 2025
    • free music header imageFree Music & Sound Effects for Your Unity GamesOctober 2, 2025

    Become a Patreon member and receive:

    • 20+ articles ad-free

    • 100+ exclusive videos on C# and how to use Unity

    • 40+ cheat sheets on all things game development

    • 2 Custom Visual Studio Themes

    • 2-day early access to articles and YouTube videos

    Join Patreon
    • Articles
    • Quizzes
    Join Patreon

    Feeling Streaky?

    You're currently on a 0-day streak. Come back tomorrow to start one.

    0

    Quizzes Page

    Unity / C#
    • 1. Which of the following loops in C# does NOT need a conditional statement to execute?

      Explanation

      A foreach loop executes without a condition having to be true. A for loop has a conditional statement that determines if the loop should continue to the next cycle i.e. the statement in the middle like i < items.Length;.

      Found this confusing? Click here to learn more about conditional statements
    • 2. What is the value of the isOnline variable in this C# code?

      var isOnline = true && false;

      Explanation

      When using the && operator, ALL boolean values must be true for the final value to be true. If even one of them is false, the final value will always be false.

      Struggling with Operators in C#? Click here to learn how to use them
    • 3. What naming convention is used when naming fields in C#?

      Explanation

      Some people use Camel Case without the underscore, but the convention is to prefix the field with one. For example, private string _firstName.

      Click here to discover more new things about Fields & Properties in C#
    • 4. What value will isLearningCSharp have in this code?

      var isLearningCSharp = !true || false;

      Explanation

      Only one option has to be true for the variable to be true, but since both are false, the variable ends up being false. I hope you're learning C# though!

      Click here to learn the truth about Booleans in C#
    • 5. What is the output of this C# code?

      int x = 2;
      int y = 4;
      int z = x + y++;
      
      Console.WriteLine(z);

      Explanation

      The post-increment operator increases the value after it has been used in the expression. So x + y becomes 2 + 4, then y becomes 5.

      Found this confusing? Click here to learn how to use Operators in C#
    • 6. What will this C# code log to the console?

      var total = 3;
      
      total +=5;
      
      Console.WriteLine(total);

      Explanation

      The += operator adds 5 to the previous value of total which is 3, resulting in 8. It can also be written like this total = total + 5.

      Found this confusing? Click here to learn more about Operators in C#
    • 7. If you use var to create a non-whole number variable in C# without a postfix, what type does the compiler infer that number to be?

      Explanation

      By default, any decimal number created with var is of type double unless you explicitly state otherwise or append the appropriate letter at the end of the number e.g. 23.9f for floats.

      Confused about numbers in C#? Click here to learn how to use them
    • 8. Where are using statements normally written?

      Explanation

      It's a convention to add using statements at the top of the file to ensure the code from the namespaces in the statements is imported first before being used in the current file.

      Struggling with C#? Click here to learn how to program using it
    • 9. Which of these is a legitimate string in C#?

      Explanation

      Option 1 is a raw string literal - the syntax is three double quotes on each side. Option 2 is an interpolated verbatim string - verbatim strings often start with an @ sign. Option 4 is the regular string you've probably seen before.

      Click here to discover more interesting things about strings
    • 10. What will this C# code log to the console?

      while (true)
      {
        Console.WriteLine("I'm walking on sunshine")
      }

      Explanation

      Since the loop's condition is permanently true, the message will be logged to the console continuously until either the application is stopped or crashes.

      Struggling with loops? Click here to learn how to use them

    Suggested

    • top youtube channels header imageTop YouTube Channels for Aspiring Unity Game DevelopersOctober 2, 2025
    • A Game Developer's Guide to Numbers in C#October 2, 2025
    • free music header imageFree Music & Sound Effects for Your Unity GamesOctober 2, 2025

    Become a Patreon member and receive:

    • 20+ articles ad-free

    • 100+ exclusive videos on C# and how to use Unity

    • 40+ cheat sheets on all things game development

    • 2 Custom Visual Studio Themes

    • 2-day early access to articles and YouTube videos

    Join Patreon

    Latest

    • free music header imageFree Music & Sound Effects for Your Unity GamesOctober 2, 2025
    • top youtube channels header imageTop YouTube Channels for Aspiring Unity Game DevelopersOctober 2, 2025
    • guy in front of graffiti[Test] Inverse Kinematics IntroductionOctober 2, 2025