Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

VB to C# Code

Convert code to C#:

UPED.CardPresent = this.chkPresent.CheckState

Thanks,
Jerry
0
JDL129
Asked:
JDL129
  • 2
  • 2
1 Solution
 
sammySeltzerCommented:
UPED.CardPresent == @this.chkPresent.CheckState

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

http://converter.telerik.com/
0
 
sammySeltzerCommented:
just put semi-colon (;) at end.
0
 
JDL129Author Commented:
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
 
NorieData ProcessorCommented:
If you need a string try ToString().

this.chkPresent.CheckState.ToString();

That will return 'Unchecked' or 'Checked'.
0
 
JDL129Author Commented:
You're the MAN!!!!!!!!!!!!!!!!!

Thanks for the response!!

I'll have more questions later!!!

Jerry
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now