Converting this for loop to C#

I’m trying to convert this particular for loop from JS to C#.

for (var t: float = 0.0; t < 1.0; ) {
  t += Time.deltaTime;
  transform.position = Vector3.Lerp(orgPos, dstPos, t);
  transform.rotation = Quaternion.Slerp(orgRot, dstRot, t);
  yield;
}  

What I’m having problem with is the fact that it’s looping through a float and also the yield command. I think it means “return here next frame” but I can’t seem to find the equivalent for C#.

I’m pretty sure you use it on the Coroutine context so here it is:

for (float t = 0.0f; t < 1.0f; ) {
    t += Time.deltaTime;
    transform.position = Vector3.Lerp(orgPos, dstPos, t);
    transform.rotation = Quaternion.Slerp(orgRot, dstRot, t);
    yield return null;
} 

The key point here is yield return null instead of just yield
In C# you have to actually return something with yield

for(float t = 0.0f; t < 1.0f; )
{
t += Time.deltaTime;
transform.position = Vector3.Lerp(orgPos, dstPos, t);
transform.rotation = Quaternion.Slerp(orgRot, dstRot, t);
yield return null;
}