NBitcoin - how to set RBF to true in order to give higher fee for transaction
NBitcoin just follow BIP125

public bool RBF
{
    get
    {
        return Inputs.Any(i =&gt; i.Sequence &lt; 0xffffffff - 1);
    }
}


If you are using the TransactionBuilder for creating a transaction, you have two ways:

One is to use TransactionBuilder.SetLockTime(blockHeight) where block height is the currentHeight-1 (actually, if you put 0 it will be fine as well)

The other way is to build your transaction without signing first with TransactionBuilder.BuildTransaction(false) change one of the input sequence, then use TransactionBuilder.SignTransaction to sign.