SlideShare a Scribd company logo
1 of 2
C# code that
                                    namespace firstclass
                                              {
                             public partial class Form1 : Form
                                              {
                                       public Form1()
                                              {
                                   InitializeComponent();
                                              }

                     private void OK_Click(object sender, EventArgs e)
                                              {
                                MessageBox.Show("hi messi");
                              }
                 }
       }




Vb net simple calculator code
Public Class Form1
    Dim a As Integer
    Dim b As Integer
    Dim c As Integer
    Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnadd.Click
        a = FirstNO.Text
        b = SecNO.Text
        c = a + b
        RESULT.Text = c

   End Sub

    Private Sub FirstNO_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles FirstNO.TextChanged

   End Sub

    Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnclear.Click
        FirstNO.Clear()
        SecNO.Clear()
        RESULT.Clear()
    End Sub

    Private Sub RESULT_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RESULT.TextChanged

   End Sub
Private Sub btnmul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnmul.Click
        a = FirstNO.Text
        b = SecNO.Text
        c = a*b
        RESULT.Text = c
    End Sub

    Private Sub btnsub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnsub.Click
        a = FirstNO.Text
        b = SecNO.Text
        c = a-b
        RESULT.Text = c
    End Sub

    Private Sub btndiv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btndiv.Click
        a = FirstNO.Text
        b = SecNO.Text
        c = a / b
        RESULT.Text = c
    End Sub
End Class

More Related Content

What's hot

Reactive cocoa
Reactive cocoaReactive cocoa
Reactive cocoaiacisclo
 
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwiftSwift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwiftAaron Douglas
 
Reactive Programming with RxSwift
Reactive Programming with RxSwiftReactive Programming with RxSwift
Reactive Programming with RxSwiftScott Gardner
 
Advanced Interfaces and Repositories in Laravel
Advanced Interfaces and Repositories in LaravelAdvanced Interfaces and Repositories in Laravel
Advanced Interfaces and Repositories in LaravelJonathan Behr
 
Codes
CodesCodes
CodesOSit3
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to KotlinPatrick Yin
 

What's hot (7)

Reactive cocoa
Reactive cocoaReactive cocoa
Reactive cocoa
 
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwiftSwift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
 
Reactive Programming with RxSwift
Reactive Programming with RxSwiftReactive Programming with RxSwift
Reactive Programming with RxSwift
 
Advanced Interfaces and Repositories in Laravel
Advanced Interfaces and Repositories in LaravelAdvanced Interfaces and Repositories in Laravel
Advanced Interfaces and Repositories in Laravel
 
Codes
CodesCodes
Codes
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Source Code
Source CodeSource Code
Source Code
 

Similar to C#

Calculator Program in C#.NET
Calculator Program in C#.NET Calculator Program in C#.NET
Calculator Program in C#.NET Dhairya Joshi
 
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.154.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15Rajes Wari
 
03 oo with-c-sharp
03 oo with-c-sharp03 oo with-c-sharp
03 oo with-c-sharpNaved khan
 
Imports System.Data.OleDb Public Class Form1 Dim connc As Ne.pdf
Imports System.Data.OleDb Public Class Form1     Dim connc As Ne.pdfImports System.Data.OleDb Public Class Form1     Dim connc As Ne.pdf
Imports System.Data.OleDb Public Class Form1 Dim connc As Ne.pdffantabulustredingco
 
C# Summer course - Lecture 3
C# Summer course - Lecture 3C# Summer course - Lecture 3
C# Summer course - Lecture 3mohamedsamyali
 
Windows Forms For Beginners Part 5
Windows Forms For Beginners Part 5Windows Forms For Beginners Part 5
Windows Forms For Beginners Part 5Bhushan Mulmule
 
Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)
Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)
Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)Jannat Ruma
 
C# Delegates and Event Handling
C# Delegates and Event HandlingC# Delegates and Event Handling
C# Delegates and Event HandlingJussi Pohjolainen
 
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganLatihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganNurul Arhaiyyu
 
Tutconstructordes
TutconstructordesTutconstructordes
TutconstructordesNiti Arora
 
Inventory management
Inventory managementInventory management
Inventory managementRajeev Sharan
 
Synapseindia dotnet development chapter 14 event-driven programming
Synapseindia dotnet development  chapter 14 event-driven programmingSynapseindia dotnet development  chapter 14 event-driven programming
Synapseindia dotnet development chapter 14 event-driven programmingSynapseindiappsdevelopment
 

Similar to C# (20)

VB net lab.pdf
VB net lab.pdfVB net lab.pdf
VB net lab.pdf
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
Hems
HemsHems
Hems
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
Calculator Program in C#.NET
Calculator Program in C#.NET Calculator Program in C#.NET
Calculator Program in C#.NET
 
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.154.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15
 
03 oo with-c-sharp
03 oo with-c-sharp03 oo with-c-sharp
03 oo with-c-sharp
 
Imports System.Data.OleDb Public Class Form1 Dim connc As Ne.pdf
Imports System.Data.OleDb Public Class Form1     Dim connc As Ne.pdfImports System.Data.OleDb Public Class Form1     Dim connc As Ne.pdf
Imports System.Data.OleDb Public Class Form1 Dim connc As Ne.pdf
 
C# Summer course - Lecture 3
C# Summer course - Lecture 3C# Summer course - Lecture 3
C# Summer course - Lecture 3
 
Windows Forms For Beginners Part 5
Windows Forms For Beginners Part 5Windows Forms For Beginners Part 5
Windows Forms For Beginners Part 5
 
Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)
Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)
Windows Form - Lec12 (Workshop on C# Programming: Learn to Build)
 
C# Delegates and Event Handling
C# Delegates and Event HandlingC# Delegates and Event Handling
C# Delegates and Event Handling
 
Constructor
ConstructorConstructor
Constructor
 
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganLatihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
 
Tutconstructordes
TutconstructordesTutconstructordes
Tutconstructordes
 
Docimp
DocimpDocimp
Docimp
 
Test Engine
Test EngineTest Engine
Test Engine
 
Inventory management
Inventory managementInventory management
Inventory management
 
Synapseindia dotnet development chapter 14 event-driven programming
Synapseindia dotnet development  chapter 14 event-driven programmingSynapseindia dotnet development  chapter 14 event-driven programming
Synapseindia dotnet development chapter 14 event-driven programming
 
C# Generics
C# GenericsC# Generics
C# Generics
 

C#

  • 1. C# code that namespace firstclass { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void OK_Click(object sender, EventArgs e) { MessageBox.Show("hi messi"); } } } Vb net simple calculator code Public Class Form1 Dim a As Integer Dim b As Integer Dim c As Integer Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click a = FirstNO.Text b = SecNO.Text c = a + b RESULT.Text = c End Sub Private Sub FirstNO_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FirstNO.TextChanged End Sub Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click FirstNO.Clear() SecNO.Clear() RESULT.Clear() End Sub Private Sub RESULT_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RESULT.TextChanged End Sub
  • 2. Private Sub btnmul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnmul.Click a = FirstNO.Text b = SecNO.Text c = a*b RESULT.Text = c End Sub Private Sub btnsub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsub.Click a = FirstNO.Text b = SecNO.Text c = a-b RESULT.Text = c End Sub Private Sub btndiv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndiv.Click a = FirstNO.Text b = SecNO.Text c = a / b RESULT.Text = c End Sub End Class