最近不知道看了什么代码,看见用了From.Tag()来把数据保留在这里,但我看了微软的帮助,它上面说的很懵懂,只是一带然后给个例子,就没有了。。。。。上网也查了一下,但没有找到确定的说法????
这是微软给的例子。。我用MessagBox.Show(customerForm.Tag.ToString());取出来看了一下,它取出Text:里的值。。那在用到时有什么帮助呢?
1
private
void
buttonNewCustomer_Click(
object
sender, EventArgs e)
2![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
{
3![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//* Create a new customer form and assign a new
4
* Customer object to the Tag property. */
5
CustomerForm customerForm = new CustomerForm();
6
customerForm.Tag = new Customer();
7
customerForm.Show();
8
}
9![](/Images/OutliningIndicators/None.gif)
10
![](/Images/OutliningIndicators/None.gif)
2
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/ContractedBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
3
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ContractedSubBlock.gif)
4
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
5
![](/Images/OutliningIndicators/InBlock.gif)
6
![](/Images/OutliningIndicators/InBlock.gif)
7
![](/Images/OutliningIndicators/InBlock.gif)
8
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
9
![](/Images/OutliningIndicators/None.gif)
10
![](/Images/OutliningIndicators/None.gif)
不知道有没有人可以来说下,说的详细一点好吗?麻烦啦!各位。。。。举例最好!