Solved

VB to C# Code

Posted on 2011-09-22
5
172 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
ID: 36583455
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
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 33

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
location of a form 2 25
VB.NET 2008 Winforms Signing 13 31
Upgrading my SSIS package in VS 2012 6 59
PowerShell:  Column widths won't expand 3 17
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

860 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