How can I use WaitForSeconds in a single line?

Here’s my code. I’m trying to create a delay after the if function, but can’t do anything, I’m beginner. In python it’s only one line code without any function or something ( time.sleep(5) ). Can anyone help me?
Thanks.

void DoorsLstn(){
        chkdoors = !chkdoors;

        if (chkdoors){
            getspeed.speed = 0f;
            OCanim.Play("Armature|Close");

            "time delay here :))) in python it's simple: time.sleep(5)"
        }

Somewhere()
{
StartCorutine(DoorsLstn());
}

IEnumerator DoorsLstn()
{
   chkdoors = !chkdoors;
 
      if (chkdoors)
        {
          getspeed.speed = 0f;
          OCanim.Play("Armature|Close");
          yield return new WaitForSeconds(5);
         }

Bye!