I have to trace all outcome When tossing four coins at once
public void TossCoin()
{
var coin1 = new string[]{ "Head", "Tail" };
var coin2 =new string[] { "Head", "Tail" };
var coin3 =new string[] { "Head", "Tail" };
var coin4 =new string[] { "Head", "Tail" };
var outcome =from first in coin1
from second in coin2
from third in coin3
from fourth in coin4
select new {possibility= coin1+","+coin2+","+coin3+","+coin4};
foreach (var oc in outcome)
{
Console.WriteLine(oc.possibility.ToString());
}
}
}
The output was
System.String[],...............
What went wrong ?