c# 控制台输出进度与百分比的代码
本文导语: c#控制台进度输出与百分比的代码。 代码示例: /// ///控制台输出进度与百分比 /// by http://www. /// using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[...
///
///控制台输出进度与百分比
/// by http://www.
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
bool isBreak = false;
ConsoleColor colorBack = Console.BackgroundColor;
ConsoleColor colorFore = Console.ForegroundColor;
//第一行信息
Console.WriteLine("****** now working...******");
//第二行绘制进度条背景
Console.BackgroundColor = ConsoleColor.DarkCyan;
for (int i = 0; ++i