Skip to content

Instantly share code, notes, and snippets.

@chaliy
Created January 2, 2011 06:03
Show Gist options
  • Save chaliy/762335 to your computer and use it in GitHub Desktop.
Save chaliy/762335 to your computer and use it in GitHub Desktop.
Idea of the input anonymous types
// Unlike Tupe<T1, T2, T3> this stuff has names. This is important for readability.
public void ApplyVariationsWithStocks(IEnumerable<{ String SKU,
NameValuePair[] Values,
int AvailableQty }> variations)
{
foreach(var variation in variations )
{
Console.WriteLine("SKU: {0}; Values: {1}; AvailableQty: {2}",
variation.SKU,
variation.Values,
variation.AvailableQty);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment