There are 2 extension methods:

static class MyClass { public static string FirstExtension(this string a,int b) { return $"{a} is {b}"; } public static string SecondExtension(this string a) { return $"And second is {a}"; } } 

In the body of the main function, these functions are called like this:

  string str = "Just Test"; str.FirstExtension(10).SecondExtension(); 

In this example, the SecondExtension function works with the result of the FirstExtension?

  • 2
    In this example, the SecondExtension function works with the result of the FirstExtension? - yes - Grundy
  • 3
    Yes, but the result you do not save anywhere and it will be lost - Andrew NOP
  • one
    "And second is Just Test is 10" - Igor

0