Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
System.NullReferenceException Handled
Debojyoti Das
May 1 2013 6:53 AM
1.2k
Reply
Here's code I have written for a simple event based multiplier , this is the error I constantly get: Object reference not set to an instance of an object ath this line:
txt3.Text = num3.ToString();
.
I am a beginner, so what's my error here? What am I missing? Thanks.
All the TextBoxes have value set in XAML.
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void txt2_TextChanged(object sender, TextChangedEventArgs e)
{
int num1, num2, num3;
num1 = int.Parse(txt1.Text);
num2 = int.Parse(txt2.Text);
num3 = num1 * num2;
txt3.Text = num3.ToString();
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
password in C# win Form
how to retrive the database values