Вы можете передать IEnumerable<IEnumerable<InlineKeyboardButton>>
в InlineKeyboardMarkup
constuctor, и каждый IEnumerable<InlineKeyboardButton>
- это одна строка, вот она:
// Buttons
InlineKeyboardButton urlButton1 = new InlineKeyboardButton();
InlineKeyboardButton urlButton2 = new InlineKeyboardButton();
InlineKeyboardButton urlButton3 = new InlineKeyboardButton();
urlButton1.Text = "Go URL1";
urlButton1.Url = "https://www.google.com/";
urlButton2.Text = "Go URL2";
urlButton2.Url = "https://www.bing.com/";
urlButton3.Text = "Go URL3";
urlButton3.Url = "https://www.yahoo.com/";
// Rows, can put multiple buttons!
InlineKeyboardButton[] row1 = new InlineKeyboardButton[] { urlButton1 };
InlineKeyboardButton[] row2 = new InlineKeyboardButton[] { urlButton2, urlButton3 };
// Set rows in Array of array | IEnamerable<IEnumerable<InlineKeyboardButton>>
InlineKeyboardButton[][] buttons = new InlineKeyboardButton[][] { row1, row2 };
// Keyboard
InlineKeyboardMarkup inline = new InlineKeyboardMarkup(buttons);
// Send message!
bot.SendTextMessageAsync(chatId, sb.ToString(), ParseMode.Html, true, false, 0, inline);