Solved

convert VB.NET to C#

Posted on 2011-03-19
4
227 Views
Last Modified: 2012-05-11
Hi,
  Please convert this VB.NET code to C#.  Please try to keep the second line of code a single line of code.

Dim questionID As Integer
questionID = CType(Items.FindControl("lblQnum"), Label).Text

Thanks, LLJ45
0
Comment
Question by:llj45
[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
4 Comments
 
LVL 23

Expert Comment

by:Rajkumar Gs
ID: 35172466
int questionID = 0;
questionID = ((Label)Items.FindControl("lblQnum")).Text;

Try
http://www.developerfusion.com/tools/convert/vb-to-csharp/

Raj
0
 
LVL 2

Accepted Solution

by:
michael_madsen earned 500 total points
ID: 35172501
Maybe something like this:

int questionID;
questionID = int.Parse(((Label)FindControl("lblQnum")).Text);
0
 

Author Comment

by:llj45
ID: 35172504
Hi, Raj
  I already tried the developerfusion converter web site.  It doesn't work on this code.
  You can set up an example to see what I mean.
Thanks, LLJ45
0
 

Author Closing Comment

by:llj45
ID: 35172512
thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

624 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