Solved

VB to C# Code

Posted on 2011-09-22
5
173 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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