Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
13
Answers
unexpected code execution
Sanju Singh
10y
814
1
Reply
hello, in the following code
private void Window_Loaded(object sender, RoutedEventArgs e)
{
// check if any kinect is available
if (Sensors.Count == 0)
{
MessageBox.Show("no sensor is available for listening !!");
Application.Current.Shutdown();
}
///
///
PromptBuilder pb1 = new PromptBuilder();
pb1.AppendText("HELLO", System.Speech.Synthesis.PromptVolume.Loud);
this.speaker(pb1);
}
the last three lines are executed even though the ' if ' condition is satisfied! can anyone explain me why ? i think the application should shutdown .
Post
Reset
Cancel
Answers (
13
)
Next Recommended Forum
Validation in WPF
Checking all the checkboxes