Не передается значение переменной одного класса в другой - C#
Формулировка задачи:
Помогите пожалуйста
ввожу вес груза 7 а он выводит тариф=10(а надо 13)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Registracia
{
public void DANO()
{
Console.Write(" Имя клиента:");
string a = Console.ReadLine();
Console.Write(" Фамилия клиента:");
string b = Console.ReadLine();
Console.Write(" Паспортные данные:");
int c = int.Parse(Console.ReadLine());
}
public void Sakas()
{
Console.Write("Вес перевозимого груза:");
int d = int.Parse(Console.ReadLine());
Console.Write("Растояние:");
int e = int.Parse(Console.ReadLine());
}
}
class Tarif
{
int d=0;
int tarif;
public void SAD()
{
if (d < 5) { tarif = 10; }
else if (d > 5 && d<15) { tarif=13; }
else if(d > 15 && d < 50) { tarif = 15; }
Console.WriteLine("За 1 км тарифная ставка составляет: {0}",tarif);
}
}
class Program
{
static void Main(string[] args)
{
Registracia b = new Registracia();
b.DANO();
b.Sakas();
Tarif s = new Tarif();
s.SAD();
Console.ReadLine();
}
}
}
Решение задачи: «Не передается значение переменной одного класса в другой»
textual
Листинг программы
private void foo() { /*MyCode*/ }