?? form1.cs
字號:
?#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
#endregion
namespace DelegateExample
{
partial class Form1 : Form
{
private delegate decimal calcDisc(decimal cost);
public Form1()
{
InitializeComponent();
cboCompany.Items.Add("Some Corp");
cboCompany.Items.Add("Other Inc");
cboCompany.Items.Add("That Company Ltd");
cboCompany.Items.Add("Small Company LLC");
}
private decimal CalcStableDiscount(decimal originalCost)
{
return originalCost - (originalCost * .25);
}
private decimal CalcRandomDiscount(decimal originalCost)
{
return originalCost - (originalCost * (System.DateTime.Now.Millisecond * .00001));
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -