Click here to Skip to main content
15,559,748 members
Home / Discussions / C#
   

C#

 
GeneralRe: dropdown to enum Pin
musefan11-Apr-11 6:40
musefan11-Apr-11 6:40 
GeneralRe: dropdown to enum Pin
OriginalGriff11-Apr-11 6:48
mveOriginalGriff11-Apr-11 6:48 
GeneralRe: dropdown to enum Pin
BobJanova11-Apr-11 6:39
BobJanova11-Apr-11 6:39 
GeneralRe: dropdown to enum Pin
OriginalGriff11-Apr-11 6:49
mveOriginalGriff11-Apr-11 6:49 
GeneralRe: dropdown to enum Pin
fififlowertot11-Apr-11 6:50
fififlowertot11-Apr-11 6:50 
GeneralRe: dropdown to enum Pin
OriginalGriff11-Apr-11 7:03
mveOriginalGriff11-Apr-11 7:03 
GeneralRe: dropdown to enum Pin
BobJanova11-Apr-11 23:16
BobJanova11-Apr-11 23:16 
AnswerRe: dropdown to enum Pin
Alan N11-Apr-11 6:53
Alan N11-Apr-11 6:53 
If the item list of the combobox is fixed and contains valid enum values only, then it is ok to do a direct cast of the SelectedItem.

C#
enum Fruit { Quince, Gooseberry, Damson }

public void InitialiseControls() {
  FruitComboBox.DataSource = Enum.GetValues(typeof(Fruit));
}

private void EatFruitBtn_Click(object sender, EventArgs e) {
  Fruit yummy = (Fruit)FruitComboBox.SelectedItem;
}

Alan.
QuestionHow to sync Data of 2 c# projects? Pin
akosidandan11-Apr-11 4:04
akosidandan11-Apr-11 4:04 
AnswerRe: How to sync Data of 2 c# projects? Pin
Wayne Gaylard11-Apr-11 4:11
professionalWayne Gaylard11-Apr-11 4:11 
GeneralRe: How to sync Data of 2 c# projects? Pin
akosidandan11-Apr-11 4:28
akosidandan11-Apr-11 4:28 
GeneralRe: How to sync Data of 2 c# projects? Pin
Wayne Gaylard11-Apr-11 4:36
professionalWayne Gaylard11-Apr-11 4:36 
GeneralRe: How to sync Data of 2 c# projects? Pin
akosidandan11-Apr-11 4:41
akosidandan11-Apr-11 4:41 
GeneralRe: How to sync Data of 2 c# projects? Pin
Wayne Gaylard11-Apr-11 4:52
professionalWayne Gaylard11-Apr-11 4:52 
QuestionNot able to see the dll which is registered successfully in cache Pin
meeram39511-Apr-11 2:44
meeram39511-Apr-11 2:44 
AnswerRe: Not able to see the dll which is registered successfully in cache Pin
Wayne Gaylard11-Apr-11 3:01
professionalWayne Gaylard11-Apr-11 3:01 
GeneralRe: Not able to see the dll which is registered successfully in cache Pin
meeram39511-Apr-11 3:13
meeram39511-Apr-11 3:13 
GeneralRe: Not able to see the dll which is registered successfully in cache Pin
meeram39511-Apr-11 3:16
meeram39511-Apr-11 3:16 
GeneralRe: Not able to see the dll which is registered successfully in cache Pin
Wayne Gaylard11-Apr-11 3:21
professionalWayne Gaylard11-Apr-11 3:21 
Questionread pst file and convert in Thunderbird,live [modified] Pin
situ2111-Apr-11 1:55
situ2111-Apr-11 1:55 
AnswerRe: read pst file and convert in Thunderbird,live Pin
Dave Kreskowiak11-Apr-11 2:13
mveDave Kreskowiak11-Apr-11 2:13 
GeneralRe: read pst file and convert in Thunderbird,live Pin
situ2111-Apr-11 3:06
situ2111-Apr-11 3:06 
GeneralRe: read pst file and convert in Thunderbird,live Pin
Dave Kreskowiak11-Apr-11 3:21
mveDave Kreskowiak11-Apr-11 3:21 
GeneralRe: read pst file and convert in Thunderbird,live Pin
Pete O'Hanlon11-Apr-11 3:38
mvaPete O'Hanlon11-Apr-11 3:38 
GeneralRe: read pst file and convert in Thunderbird,live Pin
situ2111-Apr-11 4:00
situ2111-Apr-11 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.