Ad
  • Custom User Avatar

    I had completely janked up my if logic. All sorted now!

  • Custom User Avatar

    Check your previous returns and try to see why it's returning early, or why it's not reaching the 'else' part. Console.WriteLine is your friend.

  • Custom User Avatar

    I think you're exactly right, tried changing it to return a literal string and it's still labeled String.Empty, thank you for your help :)

  • Custom User Avatar

    Your code must be not reaching that line, because null and empty string are 2 different things.

  • Custom User Avatar

    Sorry if this is just me being dumb, I'm stuck with the error:
    Test Failed
    Expected: null
    But was: <string.Empty>

    I am returning a null value with : return null;

    Is this not the way to do it in C#? I've tried googling but found nothing but discussion on the difference between null and String.Empty, which doesn't exactly help me.