<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'sum of two numbers' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'sum of two numbers' posted on the 'C#' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 00:53:08 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 00:53:08 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>sum of two numbers</title>
      <link>http://www.programmersheaven.com/mb/csharp/430220/430220/sum-of-two-numbers/</link>
      <description>Hi &lt;br /&gt;
im new in C# so i want to write a program  which will take two numbers from the user and add them. &lt;br /&gt;
I create a class and method and call it. but i wont run can you help me to find my fault here is my code.&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
namespace SumNumbers_Method_Call&lt;br /&gt;
{&lt;br /&gt;
    class sum&lt;br /&gt;
    {&lt;br /&gt;
        int result = 0;&lt;br /&gt;
        public static int Sum(int firstNumber, int secondNumber) {&lt;br /&gt;
            int result = firstNumber + secondNumber;&lt;br /&gt;
            return result;&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
----------------------------------------------&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ComponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
&lt;br /&gt;
namespace SumNumbers_Method_Call&lt;br /&gt;
{&lt;br /&gt;
    public partial class Form1 : Form&lt;br /&gt;
    {&lt;br /&gt;
        public Form1()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        private void button1_Click(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            int result = 0;&lt;br /&gt;
            int32.TryParse&lt;br /&gt;
            &lt;br /&gt;
            int calculate = sum.Sum(textBox1.Text,textBox2.Text);&lt;br /&gt;
            &lt;br /&gt;
            MessageBox.Show("result is " + result);&lt;br /&gt;
&lt;br /&gt;
            &lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/csharp/430220/430220/sum-of-two-numbers/</guid>
      <pubDate>Mon, 12 Nov 2012 03:52:31 -0700</pubDate>
      <category>C#</category>
    </item>
    <item>
      <title>Re: sum of two numbers</title>
      <link>http://www.programmersheaven.com/mb/csharp/430220/430233/re-sum-of-two-numbers/#430233</link>
      <description>You need some kind of input.&lt;br /&gt;
On Rosetta Code you can find some alternatives.&lt;br /&gt;
Guess my number/ With feedback is one way to do it&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/csharp/430220/430233/re-sum-of-two-numbers/#430233</guid>
      <pubDate>Mon, 12 Nov 2012 23:55:32 -0700</pubDate>
      <category>C#</category>
    </item>
    <item>
      <title>Re: sum of two numbers</title>
      <link>http://www.programmersheaven.com/mb/csharp/430220/431026/re-sum-of-two-numbers/#431026</link>
      <description>I think I see what might be wrong here.&lt;br /&gt;
You're using the sum class variable result here:&lt;br /&gt;
&lt;br /&gt;
MessageBox.Show("result is " + result);&lt;br /&gt;
&lt;br /&gt;
But to me it looks like you should've used the calculate variable from:&lt;br /&gt;
int calculate = sum.Sum(textBox1.Text,textBox2.Text);&lt;br /&gt;
&lt;br /&gt;
So it should read like:&lt;br /&gt;
MessageBox.Show("result is " + calculate);&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/csharp/430220/431026/re-sum-of-two-numbers/#431026</guid>
      <pubDate>Tue, 22 Jan 2013 06:12:26 -0700</pubDate>
      <category>C#</category>
    </item>
  </channel>
</rss>