Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

System : Using

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

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;
namespace
WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private voidfontToolStripMenuItem_Click(object
sender,EventArgs e)
{
FontDialog fd = new FontDialog();
fd.ShowColor =
true;
fd.ShowDialog();
richTextBox1.SelectionFont = fd.Font;
richTextBox1.SelectionColor = fd.Color;
}
private voidzoomInToolStripMenuItem_Click(objec
t sender,EventArgs e)
{
richTextBox1.ZoomFactor += 1;
}
private voidzoomOutToolStripMenuItem_Click(obje
ct sender,EventArgs e)
{
richTextBox1.ZoomFactor -= 1;
}
}
}


















using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
namespace
ConsoleApplication1
{
class A
{
int num;
static int count=0;
public A()
{
count++;
num = 0;
}
public int Num
{
get { return num; }
set { num = value; }
}
public void display()
{
Console.WriteLine(A.count);
Console.WriteLine(num);
}
public static void show()
{
Console.WriteLine(A.count);
//Console.WriteLine(num);
}


}
class Program
{
static void Main(string[] args)
{
A o1 = new A();
o1.display();
A o2 = new A();
A.show();
A o3 = new A();
o1.display();
A o4 = new A();
A.show();
}
}
}










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;
namespace
WindowsFormsApplication1
{
public partial class Form1 : Form
{
int num1;
public Form1()
{
InitializeComponent();
}
private void btnClick_Click(object sender,Event
Args e)
{
lblText.Text =
"Hello " + txtName.Text;
}
private void btn1_Click(object sender,EventArgs
e)
{
txtCalc.Text +=
"1";
}
private void btn2_Click(object sender,EventArgs
e)
{
txtCalc.Text +=
"2";
}
private void btn3_Click(object sender,EventArgs
e)
{
txtCalc.Text +=
"3";
}
private void Form1_Load(object sender,EventArgs
e)
{
}
private void button8_Click(object sender,EventA
rgs e)
{
}
private void btnP_Click(object sender,EventArgs
e)
{
num1=
Convert.ToInt32(txtCalc.Text);
txtCalc.Text =
"";
}
private void btnE_Click(object sender,EventArgs
e)
{
txtCalc.Text= (num1 +
int.Parse(txtCalc.Text)) .ToString();
}
}
}

You might also like