Choice fields are often used within SharePoint lists to display choice options like Gender, Status, etc and these choice options can be displayed using Radio Button and Dropdown formats.
Provided below is a code sample in C#.Net which describes the creation of a choice field programmatically using SharePoint API.
/* get the newly added choice field instance */ SPFieldChoice chFldGender = (SPFieldChoice)lst.Fields["Gender"]; /* set field format type i.e. radio / dropdown */ chFldGender.EditFormat = SPChoiceFormatType.Dropdown; /* set the choice strings and update the field */ chFldGender.Choices.Add("Male"); chFldGender.Choices.Add("Female"); chFldGender.Update(); /* finally update list */ lst.Update();