C# Foreach statement does not contain public definition for GetEnumerator

I’m having a problem with a Windows Form application I’m building in C#. The error is stating “foreach statement cannot operate on variables of type ‘CarBootSale.CarBootSaleList’ because ‘CarBootSale.CarBootSaleList’ does not contain a public definition for ‘GetEnumerator’”. I can’t seem to understand what is causing this. This is the code that is throwing up the error: … Read more

Ruby: undefined method `[]’ for nil:NilClass when trying to get Enumerator on an Array of Hashes

undefined method `[]’ for nil:NilClass says you tried to do something[index] but something is nil. Ruby won’t let you use nil as an array (ie. call the [] method on it). The problem is not on the attributs.each line but on the line following which calls the [] method on attribut. This indicates something in … Read more