C# return question

How can I return two different types? (I am new to C#, used to JS)
Example:

public static bool Test(bool s) {
    if (s)
        return true;
    else 
        return;
}

You cannot have more than one return type, your method must return the type specified.

if your method returns a value type it must return a value.
If your method returns a reference type it must return a reference to that type (or a derived class of that type) or null.

If you are trying to return more than one value from a method you can do this several ways. You can make a class or struct that contains multiple values and return that instead. Or you can use ref or out parameters.

This tutorial should tell you what you need to know about using ref and out.