Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tuple<Guid, string, int> does not contain a constructor that takes that many arguments

Tags:

c#

.net

I'm getting the error in the subject line based on the following code:

var myReport = new List<Tuple<Guid, string, int>>();
myReport.Add(new Tuple<Guid, string, int>(domainId, domainName, domainCount));

domainId, domainName and domainCount all have the expected data types. Any idea what might be causing this error?

like image 877
user9393635 Avatar asked May 14 '18 06:05

user9393635


1 Answers

The problem was with a missing semicolon on the subsequent line of code. I see this type of error every once in a while. The compilation error is obviously a bit confusing, but I guess that's how the compiler interprets the code for this particular scenario.

like image 181
user9393635 Avatar answered Nov 15 '22 10:11

user9393635