本文介绍了运行循环以写入列名称。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我必须设计一个模板,其中列名几乎相同,如:



Hi,

I have to design a template in which column name are almost same like:

January		|		 |		|Run Date               |
--------------------------------------------------------------------------------------
urrent DDS	|Added DDS	 | Termed DDS	|Current Locations	|Added
--------------------------------------------------------------------------------------
Locations	|Termed Locations| 2/28/2015





我必须打印相同的tamplate 12次,只有我需要更改的是月份名称。



任何人都可以建议如何运行循环吗?



I have to print same tamplate 12 times ,only I thing I have to change is month name .

Can any one please suggest how to run a loop for this?

推荐答案

string[] months = { "January", "February", ... };
foreach (string month in months)
{
    // build and print your template 
}


这篇关于运行循环以写入列名称。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 13:12