I don't understand "WaitForSeconds"

I’ve tried numerous times to look this up. I still don’t seem to get how to use it. I want to be able… in whatever part of my script I want… to wait for a specific number of seconds.
But when I try using the “WaitForSeconds” it usually gives me an error.

example of the script

void Death(){  //basically I'll call this when health <0

  death.Play();  //my critters death cry
  deathParticles.active = true; //burst of particles

WaitForSeconds(2);  // here I want to wait to give the sound and particles time to play out before the destroy

  Destroy(this.gameObject);  

}

I’ve tried "yield return new WaitForSeconds(2); but that makes it so the “void” has to be taken off the “Death” then I get other errors if I try to do that… if I don’t include the “yield return” part it tells me "expression "denotes a ‘type’ where a ‘variable’, ‘value’ or ‘method group’ was expected.

So… how can I make a script wait for a number of seconds? I don’t know what I’m doing wrong…

Below code should work properly on c#

    void Start()
	{
		ExecuteAfterDelay (3F);
	}

	IEnumerator ExecuteAfterDelay(float delay)
	{
		yield return new WaitForSeconds(delay);
		//some code goes here..
	}

OR you can use invoke method with poassing required delay in it.

    void Start()
	{
		Invoke("ExecuteAfterDelay", 3F);
	}

	void ExecuteAfterDelay()
	{
		//some code goes here..
	}

You cannot just pause in the middle of a script. That would lock your entire game up.

You need to launch a co-routine so you dont block the rest of the program.

Look here:

A slightly easier but more limited solution is to use Invoke