The name does not exists in the current context
<p>I've received two files: Sumator.cs and Kalkulator.cs @ <b>Visual Studio 2012</b></p>

<p>I think you don't need to see those two, but I did put them here anyways, go down page and check my problem.</p>

<p><b>Sumator.cs</b> code:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sumator2
{
class Sumator
{
    bool Status = false;
    double Suma = 0;
    public Kalkulator Kalk = new Kalkulator();
    public Sumator()
    {
    }

    public void ZmienStatus()
    {
        Status = !Status;
    }
    public string PokazStatus()
    {

        if (Status == true)
            return " Sumator włączony";
        else
            return " Sumator wyłaczony";

    }

    public void PokazWynikS()
    {
        if (Status == true)
            Suma += Kalk.Wynik;
        Console.WriteLine("Wynik działania : " + Kalk.L1.ToString() + " " + Kalk.Dzialanie.ToString() + " " + Kalk.L2.ToString() + " = " + Kalk.Wynik.ToString() + PokazStatus() + "   Suma= " + Suma.ToString());
    }

    public void Zeruj()
    {
        Suma = 0;
    }
}
}
</code></pre>

<p><b>Kalkulator.cs</b> code:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sumator2
{
class Kalkulator
{
    public double L1;
    public double L2;
    public double Wynik;
    public String Dzialanie = "";
    public Kalkulator()
    {
    }
      void Oblicz()
    {
        switch (Dzialanie)
        {
            case "+":
                Wynik = L1 + L2;
                break;
            case "-":
                Wynik = L1 - L2;
                break;
            case "*":
                Wynik = L1 * L2;
                break;
            case "/":
                Wynik = L1 / L2;
                break;

        }
    }
    public void PodajDzialanie(double licz1, double licz2, string dz)
    {
        L1 = licz1;
        L2 = licz2;
        Dzialanie = dz;
        Oblicz();

    }
    public void PokazWynik()
    {
        Console.WriteLine("Wynik działania : " + L1.ToString() + " " + Dzialanie.ToString() + " " + L2.ToString() + " = " + Wynik.ToString());
    }

}
}
</code></pre>

<p>and I've written my main code for those two.
<b>Program.cs</b> code:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sumator2
{
class Program
{
    static void Main(string[] args)
    {
        Sumator s1 = new Sumator();

        s1.ZmienStatus();

        bool userNum = true;
        while (userNum)
        {
            double userDouble;
            string userString = Console.ReadLine();

            if (userNum = double.TryParse(userString, out userDouble))
            {
                userDouble = Convert.ToDouble(userString);
                userNum = false;
            }
            else 
            {
                Console.WriteLine("Nie podano liczby!");
                userNum = true;
            }
        }


        s1.Kalk.PodajDzialanie(userDouble, 2, "*");
        s1.PokazWynikS();
        s1.Kalk.PokazWynik();

        s1.Kalk.PodajDzialanie(userDouble, 2, "+");
        s1.PokazWynikS();
        s1.Kalk.PokazWynik();


        Console.ReadKey();
    }
}
}
</code></pre>

<p>Problem is that I wanted to use s1.Kalk.PodajDzialanie() function with those arguments:</p>

<pre><code> s1.Kalk.PodajDzialanie(userDouble, 2, "*");
</code></pre>

<p>and I got error like:</p>

<pre><code> The name 'userDouble' does not exists in the current context
</code></pre>

<p>I mean wt*? This function does work normally if I do like:</p>

<pre><code> s1.Kalk.PodajDzialanie(2, 2, "*");
</code></pre>
