简答 经理评分
1.30 30
2.值类型的数据存储在内存的栈中;引用类型的数据存储在内存的堆中,而内存单元中只存放堆中对象的地址
3.结构是值类型,而类则是引用类型
4.
static void Main(string[] args)
{
Console.WriteLine("请输入价格");
double pay = Convert.ToDouble(Console.ReadLine());
if (pay < 100)
{
Console.WriteLine("付款:{0}", pay);
}
else
{
Console.WriteLine("付款:{0}",pay-50);
}
Console.ReadLine();
}
5.
static void Main(string[] args)
{
int[] num = new int[] { 55, 60, 63 };
Console.WriteLine("原分数:");
foreach (var item in num)
{
Console.WriteLine(item);
}
up(num);
Console.WriteLine("\n提分后:");
foreach (var item in num)
{
Console.WriteLine(item);
}
Console.ReadLine();
}
public static void up(int[] num )
{
for (int i = 0; i < num.Length;i++ )
{
num[i] += 5;
}
经理评分
:
public void UdateView()
{
pingjia = new SE[3];
SE i = new SE();
i.Id = 111;
i.Name = "王小毛";
i.Age = 26;
i.Jinping = "未评价";
i.Deifen = 0;
pingjia[0] = i;
SE q = new SE();
q.Id = 112;
q.Name = "周新雨";
q.Age = 22;
q.Jinping = "未评价";
q.Deifen = 0;
pingjia[1] = q;
SE w = new SE();
w.Id = 111;
w.Name = "王小毛";
w.Age = 26;
w.Jinping = "未评价";
w.Deifen = 0;
pingjia[2] = w;
}
public void UpdateView()
{
listView1.Items.Clear();
for (int i = 0; i < pingjia.Length;i++ )
{
if(pingjia[i]!=null)
{
ListViewItem item = new ListViewItem(pingjia[i].Id.ToString());
item.SubItems.Add(pingjia[i].Name.ToString());
item.SubItems.Add(pingjia[i].Age.ToString());
item.SubItems.Add(pingjia[i].Jinping.ToString());
item.SubItems.Add(pingjia[i].Deifen.ToString());
listView1.Items.Add(item);
}
}
}
private void FrmJudge_Load(object sender, EventArgs e)
{
textBox1.Text=selectItem.SubItems[1].Text;
textBox1.ReadOnly = true;
}
private void button1_Click(object sender, EventArgs e)
{
selectItem.SubItems[3].Text = textBox1.Text;
selectItem.SubItems[4].Text = textBox2.Text;
this.Close();
}
private void listView1_DoubleClick(object sender, EventArgs e)
{
ListViewItem selectItem=listView1.SelectedItems[0];
FrmJudge frm=new FrmJudge();
frm.selectItem = selectItem;
frm.Show();
}
public ListViewItem selectItem = null;
private void button1_Click(object sender, EventArgs e)
{
selectItem.SubItems[3].Text = textBox1.Text;
selectItem.SubItems[4].Text = textBox2.Text;
this.Close();
}
private void FrmJudge_Load(object sender, EventArgs e)
{
textBox1.Text=selectItem.SubItems[1].Text;
textBox1.ReadOnly = true;
}