0
   public static string first_last(string ustr)
    {
        return ustr.Length > 1 ? ustr.Substring(ustr.Length - 1) + ustr.Substring(1, ustr.Length - 2) + ustr.Substring(0, 1) : ustr;
    }

I am trying to learn C# syntax.

Mark Schultheiss
  • 32,614
  • 12
  • 69
  • 100
  • That's the [ternary conditional operator](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-operator). – D M Mar 29 '22 at 15:04
  • It's one operator, the [ternary conditional operator](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-operator) – Mathias R. Jessen Mar 29 '22 at 15:04
  • The comma's separate parameters being passed to those methods – Mark Schultheiss Mar 29 '22 at 15:04

0 Answers0