using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo
{
class Program
{
static string text;
static void Main(string[] args)
{
int i;
//string text="";
for (i=0;i<10;i++)
{
text = "Line" + Convert.ToString(i);
Console.WriteLine("{0}",text);
}
Console.WriteLine("Last text output in loop:{0}",text);
Console.ReadKey();
}
}
}
本文转自TBHacker博客园博客,原文链接:http://www.cnblogs.com/jiqing9006/p/6748003.html,如需转载请自行联系原作者