0

Hello,

I“m trying next example

http://msdn.microsoft.com/en-gb/library/ff630942.aspx

but I have the error:

Ā ‘Microsoft.SharePoint.SPContentTypeCollection’ no contiene una definición de ‘Cast’ ni se encontró ningĆŗn mĆ©todo de extensión ‘Cast’ que acepte un primer argumento de tipo ‘Microsoft.SharePoint.SPContentTypeCollection’ (Āæfalta una directiva de uso o una referencia de ensamblado?

With Google Translate ;Ā 

‘Microsoft.SharePoint.SPContentTypeCollection’ does not contain a definition for ‘Cast’ and found no extension method ‘Cast’ accepting a first argument of type ‘Microsoft.SharePoint.SPContentTypeCollection’ (are you missing a using directive or reference assembled?

The problem is in the line:

SPField newField = spWeb.Fields .Cast<SPField>() .FirstOrDefault(f => f.StaticName == “Team Project”);

Some idea?

Regards,

MarĆ­a

(Visited 87 times, 1 visits today)
Add a Comment