title: My rectangle area and perimeter comes out zero in C#
body: <p>why the result in the area of the rectangle and it's perimeter comes out by zero?</p>
  
  <p>in using C#</p>
  
  <pre><code>namespace ConsoleApplication8
  {
      class Program
      {
          static void Main(string[] args)
          {
              rec r = new rec();
              r.L = Convert.ToInt32(Console.ReadLine());
              r.wi = Convert.ToInt32(Console.ReadLine());
              Console.WriteLine(r.area());
              Console.WriteLine(r.per());
          }
      }
      class rec
      {
          int l;
          int w;
          public int L
              {
                  set
                  {
                      l = L;
                  }
                  get
                  {
                      return l;
  
                  }
              }
              public int wi
              {
                  set
                  {
                      w = wi;
                  }
                  get
                  {
                      return w;
                  }
              }
              public rec()
              {
              }
              public rec(int x, int y)
              {
                  l = x;
                  w = y;
              }
              public double area()
              {
                  return l * w;
              }
              public int per()
              {
                  return 2 * l + 2 * w;
              }
      }
  
  }
  </code></pre>