Click here to Skip to main content
14,207,436 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
hi please explain this

Button b=(Button)
Posted
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

maheswarareddy wrote:
Button b=(Button)


This line has no sense and will give compile time error.

you can not assign a Type to a variable
   
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Rather it should be:

Button b = (Button)object;
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190612.1 | Last Updated 14 May 2010
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100