Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A tuple may not contain a value of type 'void'.
Example
The following sample generates CS8210:
// CS8210.cs
void Method()
{
}
void Test()
{
var x = ("something", Method());
}
Your method returns void
, so that method doesn't return a value. You can't use a method that returns void
for a data member of a tuple.
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.