❔ What is not { } means?

async Task HandleUpdateAsync(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken)
{
    // Only process Message updates: https://core.telegram.org/bots/api#message
    if (update.Message is not { } message)
        return;
    // Only process text messages
    if (message.Text is not { } messageText)
        return;

So I'm looking into building a bot for telegram with C# but I don't fully understand what is going on here. What this update.Message is not { } message does? Can I add "rules" inside the curly braces to make it so it has a early return?

Where I found the code:
https://telegrambots.github.io/book/1/example-bot.html
Was this page helpful?