It would need to be something like

string type = sender.GetType().ToString();

switch(type)
{
        case "System.Windows.Forms.Button":
                Button btn1 = (Button)sender;
                btn1.Text = "Hello World";
              break;

}

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf
Of John Brett
Sent: Tuesday, June 20, 2006 10:33 AM
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] VB's Select Case
Equivalent in C#

> i think what you're trying to do is something like:
>
> > switch(sender){

 error CS0151: A value of an integral type expected

===================================
This list is hosted by DevelopMentorR
http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to