I've already tried that.
C# requires an integral type, i.e., integer, string, etc.
So you can do a switch with a variable that equates to true like:

bool v = true;
switch(v){
...
}

You cannot, however, do something like this inside the case statement:
case (sender == btn1):
 break;

C# requires that value after the case statement be a constant - numeric,
string, or whatever.


On 6/20/06, John Brett <[EMAIL PROTECTED]> wrote:

> 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 DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.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