In mono for android on c# Resource.id dose not exist why?
<p>I have this code:</p>

<pre><code>using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Speech.Tts;
using System.Collections.Generic;
namespace SayItAndroid{ [Activity (Label = "SayItAndroid", MainLauncher = true)]
    public class Activity1 : Activity, TextToSpeech.IOnInitListener
{
    int count = 1;
    TextToSpeech mTts;
    public void OnInit (int status)
    {
        Console.WriteLine ("Listening to text to speech");
    }
    protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);// Set our view from the "main" layout resource
        SetContentView (Resource.Layout.Main);
        Intent checkIntent = new Intent();
        checkIntent.SetAction(TextToSpeech.Engine.ActionCheckTtsData);
        StartActivityForResult(checkIntent, 100);           // Get our button from the layout resource,         // and attach an event to it            
        Button button = FindViewById&lt;Button&gt; (Resource.Id.myButton);
        button.Click += delegate
        {
            string myText1 = "Did you sleep well?";
            string myText2 = "I hope so, because it's time to wake up.";
            mTts.Speak(myText1, QueueMode.Add, new Dictionary&lt;string, string&gt;());
            mTts.Speak(myText2, QueueMode.Flush, new Dictionary&lt;string, string&gt;());
        };
    }
    protected override void OnActivityResult (int requestCode, Result resultCode, Intent data)
    {
        base.OnActivityResult (requestCode, resultCode, data);
        if(requestCode == 100)
        {
            mTts = new TextToSpeech(this, this);
        }
    }
}}
</code></pre>

<p>But on the two places i have Resource im getting red line error under the Resource:</p>

<p>Error   1   The name 'Resource' does not exist in the current context   </p>

<p>How can i solve it ?</p>

<p>Thanks.</p>
