Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
(Convert.ToBoolean(objUserMgmtData.ActiveYN))?radYes.Checked = true : radNo.Checked = true;


or

C#
(Convert.ToBoolean(objUserMgmtData.ActiveYN))?radYes.Checked : radNo.Checked;


message:Only assignment, call, increment, decrement and new object expressions can be used as a statement.

objUserMgmtData.ActiveYN is bool type
Posted
Updated 9-Nov-12 23:21pm
v2
Comments
SoumenBanerjee 10-Nov-12 0:19am    
in conditional statement assignment part must be in left hand side part
so you have to write like this
radYes.Checked =.....

1 solution

C#
(Convert.ToBoolean(objUserMgmtData.ActiveYN)?radYes.Checked : radNo.Checked);


try to do this
 
Share this answer
 
Comments
bbirajdar 10-Nov-12 4:47am    
correct +5
Dain Ucak 10-Nov-12 4:49am    
thank you
[no name] 11-Nov-12 23:01pm    
NO use... Still the same message... oops

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900