Quantcast
Channel: switch case help
Viewing all articles
Browse latest Browse all 5

switch case help

$
0
0
I keep on receiving this error " The name 'Liverpool' does not exist in the current context "
May I know how can I solve this and why cause the problem.
This is part of my code.
Thank You

 

privatevoid btnShow_Click(object sender, EventArgs e)

{

 

string strChampion;

strChampion =

Convert.ToString(txtChampion.Text);

 

switch (strChampion)

{

 

case Liverpool:

 

MessageBox.Show("YOU ARE SO SMART AS THEY ARE THIS SEASON EPL,CHAMPOIN LEAGUE, FA CUP AND CARLING CUP CHAMPION");

 

break;


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images