'System.Array' does not contain a definition for 'FirstOrDefault' and no extension method 'FirstOrDefault' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)
What am i missing Ctrl . does not work here ( I am using MVC 2) :(
its for getting the string length from the metadata of a class
var stringLength = member.Member.GetCustomAttributes(typeof(StringLengthAttribute), false).FirstOrDefault() as StringLengthAttribute;
Its part of some code i found on the net for a custom helper to create textboxfor with Maxlength without having to add to to ever textbox for manually.
But it is not compliing
View Complete Post