You are creating a Microsoft Windows SharePoint Services site.
You need to add a new site column of type Choice to the site.
Which code segment should you use?
A.
Shared Sub CreateSiteColumn(ByVal web As SPWeb, ByVal _
columnName As String, ByVal required As Boolean)
web.Fields.Add(columnName, SPFieldType.Choice, required)
End Sub
B.
Shared Sub CreateSiteColumn(ByVal web As SPWeb, ByVal _
columnName As String, ByVal required As Boolean)
web.Lists(0).Fields.Add(columnName, SPFieldType.Choice, required)
End Sub
C.
Shared Sub CreateSiteColumn(ByVal web As SPWeb, ByVal _
columnName As String, ByVal required As Boolean)
web.Lists(0).Views(0).ViewFields.Add(columnName, _
SPFieldType.Choice, required)
End Sub
D.
Shared Sub CreateSiteColumn(ByVal web As SPWeb, ByVal _
columnName As String, ByVal type As SPFieldType, ByVal required As _
Boolean)
Dim field As SPField = New SPFieldChoice(web.Lists(0).Fields, _
columnName)
field.Required = required
field.Up date()
End Sub