My apologies for asking, what seems like, a really basic question - but I can't appear to assign a value to a 'Choice' field programmatically and can't find anything documented anywhere.
Defined in my xml as:
<Field Type="Choice" DisplayName="MyChoiceField" StaticName="MyChoiceField" Name="MyChoiceField"
ID="[GUID]" Format="Dropdown" FillInChoice="FALSE" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" >
<Default></Default>
<CHOICES>
<CHOICE>Choice1</CHOICE>
<CHOICE>Choice2</CHOICE>
</CHOICES>
</Field>
And my attempted assign as:
item["MyChoiceField"] = "Choice1";
But I'm getting the exception that this is an invalid value for a choice field.