Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
QuestionStore uint value in int [solved] Pin
Xmen Real 4-Aug-09 23:49
professional Xmen Real 4-Aug-09 23:49 
AnswerRe: Store uint value in int [solved] Pin
Super Lloyd5-Aug-09 0:12
Super Lloyd5-Aug-09 0:12 
GeneralRe: Store uint value in int [solved] Pin
Xmen Real 5-Aug-09 0:25
professional Xmen Real 5-Aug-09 0:25 
QuestionArrays Pin
Bandisto4-Aug-09 23:37
Bandisto4-Aug-09 23:37 
AnswerRe: Arrays Pin
SeMartens4-Aug-09 23:41
SeMartens4-Aug-09 23:41 
AnswerRe: Arrays Pin
Luc Pattyn4-Aug-09 23:41
sitebuilderLuc Pattyn4-Aug-09 23:41 
AnswerRe: Arrays Pin
stancrm4-Aug-09 23:43
stancrm4-Aug-09 23:43 
QuestionUnhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down4-Aug-09 23:20
Cracked-Down4-Aug-09 23:20 
Hi all,

I have found this some unusual problem while working on the debug and release build. I have two forms MainForm and ModelForm. Following is the code for these respective forms .cs files

Code for MainForm.cs :


namespace ModelDialogExceptions
{
    public partial class  MainForm : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                ModelDialog mdl = new ModelDialog();
                mdl.ShowDialog(); 
            }
            catch (Exception exc)// caught only in the Debug build
            {
                MessageBox.Show("Exception captured!!!");
            }
        }
    }
}



And code for ModelForm.cs :

namespace ModelDialogExceptions
{
    public partial class ModelDialog : Form
    {
        public ModelDialog()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            throw new System.IO.FileNotFoundException("");
        }
    }
}


If I run this project in debug build, message box gets poped up however, in the Release (when i run output .exe in) build an unhandeled exception is raised.

Any body know, why this code is behaving differently for different builds?
or any comments about this!!
AnswerRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Christian Graus4-Aug-09 23:26
protectorChristian Graus4-Aug-09 23:26 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down4-Aug-09 23:53
Cracked-Down4-Aug-09 23:53 
AnswerRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Luc Pattyn4-Aug-09 23:44
sitebuilderLuc Pattyn4-Aug-09 23:44 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Christian Graus4-Aug-09 23:46
protectorChristian Graus4-Aug-09 23:46 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down5-Aug-09 0:05
Cracked-Down5-Aug-09 0:05 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Christian Graus5-Aug-09 0:17
protectorChristian Graus5-Aug-09 0:17 
AnswerRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Moreno Airoldi5-Aug-09 0:48
Moreno Airoldi5-Aug-09 0:48 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down5-Aug-09 1:03
Cracked-Down5-Aug-09 1:03 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Moreno Airoldi5-Aug-09 2:44
Moreno Airoldi5-Aug-09 2:44 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down5-Aug-09 18:45
Cracked-Down5-Aug-09 18:45 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Moreno Airoldi5-Aug-09 23:19
Moreno Airoldi5-Aug-09 23:19 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down6-Aug-09 0:20
Cracked-Down6-Aug-09 0:20 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Moreno Airoldi6-Aug-09 0:26
Moreno Airoldi6-Aug-09 0:26 
Question"NC code" text file parsing with C# Pin
kirazercan4-Aug-09 22:14
kirazercan4-Aug-09 22:14 
AnswerRe: "NC code" text file parsing with C# Pin
Christian Graus4-Aug-09 22:25
protectorChristian Graus4-Aug-09 22:25 
Question[Message Deleted] Pin
engg_sukreet4-Aug-09 22:08
engg_sukreet4-Aug-09 22:08 
AnswerRe: hi Pin
Christian Graus4-Aug-09 22:13
protectorChristian Graus4-Aug-09 22:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.