Solved

VB to C# Code

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

UPED.CardPresent = this.chkPresent.CheckState

Thanks,
Jerry
0
Comment
Question by:JDL129
  • 2
  • 2
5 Comments
 
LVL 28

Expert Comment

by:sammySeltzer
Comment Utility
UPED.CardPresent == @this.chkPresent.CheckState

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

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

Expert Comment

by:sammySeltzer
Comment Utility
just put semi-colon (;) at end.
0
 

Author Comment

by:JDL129
Comment Utility
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 33

Accepted Solution

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

this.chkPresent.CheckState.ToString();

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

Author Closing Comment

by:JDL129
Comment Utility
You're the MAN!!!!!!!!!!!!!!!!!

Thanks for the response!!

I'll have more questions later!!!

Jerry
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now