Solved

VB to C# Code

Posted on 2011-09-22
5
174 Views
Last Modified: 2013-12-17
Convert code to C#:

UPED.CardPresent = this.chkPresent.CheckState

Thanks,
Jerry
0
Comment
Question by:JDL129
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 36583455
UPED.CardPresent == @this.chkPresent.CheckState

You can use this tool to do it yourself as well.

http://converter.telerik.com/
0
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 36583458
just put semi-colon (;) at end.
0
 

Author Comment

by:JDL129
ID: 36583506
Sorry guys but neither works.

The help text says: Cannot implicitly convert type 'system.windows.forms.checkstate' to 'string''
I'm trying to determine if the checkbox is checked or not.

Thanks for the post!!!

Jerry
0
 
LVL 34

Accepted Solution

by:
Norie earned 50 total points
ID: 36583698
If you need a string try ToString().

this.chkPresent.CheckState.ToString();

That will return 'Unchecked' or 'Checked'.
0
 

Author Closing Comment

by:JDL129
ID: 36583715
You're the MAN!!!!!!!!!!!!!!!!!

Thanks for the response!!

I'll have more questions later!!!

Jerry
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question