0

I want to use a tuple as an input argument for my function.

public void Sync(IEnumerable<Tuple<string, double>> labels)

But I also want to give the string and double a name. But I can't get the syntax right. I am looking at all kinds of other blogs about named tuples, but no one seem to named their tuples in the functions. Is it even possible?

I would expect it to look like this.

public void Sync(IEnumerable<Tuple<string Text, double Score>> labels)
  • 2
    that would basically look like this: `public void Sync(IEnumerable<(string Text, double Score)> labels)` – Mong Zhu Jul 12 '19 at 08:18
  • 1
    @MongZhu: Thank you, I tried this and now it states that I am missing a reference to ValueTuple2, so I guess I could fix that. – Sjoerd van Loon Jul 12 '19 at 11:53

0 Answers0