Let it be simplified:
using System; class P { static void M<R>(params Func<R>[] p) {} static void N(int i, string s, decimal m) { M(()=>i, ()=>s);
Now itβs clear why your program crashes?
In my program, every call tries to make a conclusion R. In the first call to R, both int and string are called, and therefore the output is not executed, because there is no type that is both int and string. In the second, R is defined as int and ... int again! which succeeds because int matches all bounds. In the third, R is defined as int and decimal, which succeeds because each int can be implicitly converted to decimal, so decimal is good output.
Identifier and status are probably properties with incompatible types. If you want to do this, then one of the types that should be selected should be the best type.
Note that C # never says "oh, I see that you have drawn the boundaries of the dog, cat and fish, so I think you had in mind the animal." C # rather says that "none of the Dogs, Cats or Pisces is certainly the best border, so I donβt know what you had in mind, please state it explicitly."
source share