Essential C# Keywords  Suggest an edit

return

Returns exits a method.

public int Sum(int valueA, int valueB)
{
    return valueA + valueB;
}


public void Terminate(bool terminateEarly)
{
    if (terminateEarly) return; // method returns to caller if true was passed in
    else Console.WriteLine("Not early"); // prints only if terminateEarly was false
}

Table Of Contents
22 Enum
25 GUID
52 Keywords
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close