Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using mynamespace;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Class1 a = new Class1();
- int d =a.add(9, 5);
- MessageBox.Show(d.ToString());
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace mynamespace
- {
- class Class1
- {
- int a;
- int b;
- int c;
- public Class1()
- {
- }
- public Class1(int a1, int b1, int c1)
- {
- a = a1;
- b = b1;
- c = c1;
- }
- public int add(int a , int b)
- {
- int c=a+b;
- return c;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement