Click here to Skip to main content
15,897,519 members
Home / Discussions / C#
   

C#

 
GeneralICheck Pin
Paul Michalik9-Sep-10 20:23
Paul Michalik9-Sep-10 20:23 
GeneralRe: ICheck Pin
Pete O'Hanlon11-Sep-10 2:16
mvePete O'Hanlon11-Sep-10 2:16 
AnswerRe: what is advantges of using interface reference instead of class refernce Pin
PIEBALDconsult9-Sep-10 4:03
mvePIEBALDconsult9-Sep-10 4:03 
AnswerRe: what is advantges of using interface reference instead of class refernce Pin
Pete O'Hanlon9-Sep-10 4:47
mvePete O'Hanlon9-Sep-10 4:47 
AnswerRe: what is advantges of using interface reference instead of class refernce Pin
Paul Michalik9-Sep-10 21:05
Paul Michalik9-Sep-10 21:05 
QuestionHow to pass ArrayList object back from a Thread Pin
largenqcd8-Sep-10 16:41
largenqcd8-Sep-10 16:41 
AnswerRe: How to pass ArrayList object back from a Thread Pin
Luc Pattyn8-Sep-10 16:56
sitebuilderLuc Pattyn8-Sep-10 16:56 
Questionconvert VB code to C# code [modified] Pin
krobinson9378-Sep-10 15:35
krobinson9378-Sep-10 15:35 
I'm new to online forums discussion, but I try to be clear.

I'm developing a basic conversion from VB to C#. This portion of the code is a user input, ex..inter a number click - print out Is it a number: true or Is it a number: false.

If user input anything other than a number, print out will be Is it a number: false

I have coverted, but getting error: Return error "expected class, delegae, enum, interface, or struct"

I have a red line under void.

I tried the web site that was mentioned on a similar question, but still got red line under void.

Protected Sub btnStep2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim bTest As Boolean
        Dim iNum As Integer

        'Integer.TryParse is used to see if the compiler can convert
        '  the string to an Integer
        '  It returns a Boolean and if successful
        '  iNum will hold the numeric result.
        bTest = Integer.TryParse(txtStep2.Text, iNum)
        lblData.Text = "Is it a number: " & bTest.ToString()
    End Sub




protected void btnStep2_Click(object sender ,  System.EventArgs e )
       bool bTest = false;
       int iNum = Integer;
{ 
        // Integer.TryParse is used to see if the compiler can convert
        //  the string to an Integer
        //  It returns a Boolean and if successful
        //  iNum will hold the numeric result.
        bTest = Integer.TryParse(txtStep2.Text, iNum);
        lblData.Text = "Is it a number: " & bTest.ToString();
    }


modified on Wednesday, September 8, 2010 11:58 PM

AnswerRe: convert VB code to C# code Pin
Luc Pattyn8-Sep-10 15:56
sitebuilderLuc Pattyn8-Sep-10 15:56 
AnswerRe: convert VB code to C# code Pin
J4amieC8-Sep-10 22:02
J4amieC8-Sep-10 22:02 
AnswerRe: convert VB code to C# code Pin
AspDotNetDev9-Sep-10 13:04
protectorAspDotNetDev9-Sep-10 13:04 
QuestionHiding/Showing panels Pin
Megidolaon8-Sep-10 12:46
Megidolaon8-Sep-10 12:46 
AnswerRe: Hiding/Showing panels Pin
Luc Pattyn8-Sep-10 14:05
sitebuilderLuc Pattyn8-Sep-10 14:05 
AnswerRe: Hiding/Showing panels Pin
Dave Kreskowiak8-Sep-10 18:08
mveDave Kreskowiak8-Sep-10 18:08 
AnswerRe: Hiding/Showing panels Pin
The Man from U.N.C.L.E.9-Sep-10 7:34
The Man from U.N.C.L.E.9-Sep-10 7:34 
AnswerRe: Hiding/Showing panels Pin
Megidolaon9-Sep-10 8:15
Megidolaon9-Sep-10 8:15 
GeneralRe: Hiding/Showing panels Pin
OriginalGriff9-Sep-10 8:51
mveOriginalGriff9-Sep-10 8:51 
GeneralRe: Hiding/Showing panels Pin
Luc Pattyn9-Sep-10 13:47
sitebuilderLuc Pattyn9-Sep-10 13:47 
GeneralRe: Hiding/Showing panels Pin
Megidolaon9-Sep-10 14:42
Megidolaon9-Sep-10 14:42 
GeneralRe: Hiding/Showing panels Pin
Luc Pattyn9-Sep-10 14:51
sitebuilderLuc Pattyn9-Sep-10 14:51 
GeneralRe: Hiding/Showing panels Pin
Megidolaon9-Sep-10 17:49
Megidolaon9-Sep-10 17:49 
Question10 band equalizer using DIRECTX in C# Pin
Nishad Ullaskumar P8-Sep-10 7:28
Nishad Ullaskumar P8-Sep-10 7:28 
AnswerRe: 10 band equalizer using DIRECTX in C# Pin
Dave Kreskowiak8-Sep-10 10:32
mveDave Kreskowiak8-Sep-10 10:32 
AnswerRe: 10 band equalizer using DIRECTX in C# [ignore] Pin
Ravi Bhavnani9-Sep-10 9:00
professionalRavi Bhavnani9-Sep-10 9:00 
QuestionXML Document Reader [modified] Pin
raghavsesh8-Sep-10 5:58
raghavsesh8-Sep-10 5:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.