public void Start(string connectStr, int dbLinkCount = 10) { dbLinks = new DatabaseLink[dbLinkCount]; DatabaseService.connectStr = connectStr; for (int i = 0; i < dbLinks.Length; i++) { var dbLink = new DatabaseLink(this, i); dbLinks[i] = dbLink; dbLink.Start(connectStr); } Console.WriteLine("启动数据库连接池({0}个连接)", dbLinkCount); }