Results 1 to 9 of 9

Thread: Visual Basic 6.0 to to C#

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    222

    Visual Basic 6.0 to to C#

    Hi;

    I'm already using Visual Basic 6.0. Furthermore i would like to learn C# but it's look like hard for now. Where should I start or or could you give me samples.

    For example I would like to add two textbox value by using function in C#.

    In Visual basic

    I'm using global function in Bas module like below
    Code:
    Public Result As Double
    Public Function Add(Val1 As Double, Val2 As Double)
    Result = Val1 + Val2
    End Function
    and in Form1
    Code:
    Private Sub Command1_Click()
    Dim a As Double
    Dim b As Double
    a = Val(Text1)
    b = Val(Text2)
    Call Add(a, b)
    MsgBox Result
    End Sub
    Thank you

    Levent
    Last edited by levent; Nov 21st, 2009 at 12:58 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width