When i am creating SPFields the constructor states that you must pass in a collection of fields.
Can anyone enlighten me on why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The constructor wants some contextual information about which collection of fields it will be added to. You shouldn’t create new fields this way, though. Instead, use
SPFieldCollection.Add()– which will construct the object and add it to the appropriate collection.