本文介绍了如何在按钮单击下依次向数组添加值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在按钮单击下依次向数组添加值...我想将项添加到第0个索引,然后根据按钮单击添加第一个索引....
How to add values to an array one after the other under button click...I want to add items to the zeroth index and then the first index based on button click....
推荐答案
int arrayCount = 0;
private void button_Click(sender s, event e)
{
sum += myArray[arrayCount++];
}
这篇关于如何在按钮单击下依次向数组添加值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!