How do I use Yield in C#?

How does one use yield in C#. It behaves differently then the Javascript version of yield.

I was trying to convert this Javascript example to C#. It doesn't seem to call the corfunAlp routine. Help!

using UnityEngine;
using System.Collections;

public class fader : MonoBehaviour {

    public GameObject gamobjBac;
    Color thecolor;

    // Use this for initialization
    void Start ()
    {
        corfunAlp (gamobjBac, 0, 1, 1);
        // Turn opaque 
        corfunAlp (gamobjBac, 4, 1, 0);
        // Turn transparent     
    }

    // Update is called once per frame
    void Update ()
    {
    }

    //function that fades alpha for a game object up or down with a start delay and duration of fade
    public IEnumerator corfunAlp (GameObject gamobjGamObj, float floWai, float floDur, int intAlpGoa)
    {

        float floAlp = (1 - intAlpGoa);
        intAlpGoa = ((2 * intAlpGoa) - 1);

        yield return new WaitForSeconds (floWai);

        while (floAlp >= 0 && floAlp <= 1) 
        {
            thecolor = gamobjGamObj.renderer.material.GetColor ("_Color");
            thecolor.a = floAlp; 
            gamobjGamObj.renderer.material.SetColor ("_Color", thecolor);

            floAlp = floAlp + ((Time.deltaTime/floDur)*intAlpGoa);    
            yield return true; 
        }
    }

}

You need to manually call StartCoroutine() for C# coroutines. That information is provided in the documentation here.

To use it in you example, simply change your Start function as follows.

// Use this for initialization
void Start ()
{
        StartCoroutine(corfunAlp (gamobjBac, 0, 1, 1));
        // Turn opaque 
        StartCoroutine(corfunAlp (gamobjBac, 4, 1, 0));
        // Turn transparent     
}

Murcho is correct. But for additional help I wrote this tutorial awhile back on Coroutines for both JS and C#:

http://infiniteunity3d.com/2009/09/27/tutorial-coroutines-pt-1-waiting-for-input/

Hope that helps!

And there is even some more info in the docs. Here.