Click here to Skip to main content
15,888,269 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is it true about decompiling programs written in .net?! Pin
PIEBALDconsult2-Sep-11 3:02
mvePIEBALDconsult2-Sep-11 3:02 
GeneralRe: Is it true about decompiling programs written in .net?! Pin
Hamed Hemati2-Sep-11 3:20
Hamed Hemati2-Sep-11 3:20 
GeneralRe: Is it true about decompiling programs written in .net?! Pin
Columbus-MCSD2-Sep-11 4:22
Columbus-MCSD2-Sep-11 4:22 
GeneralRe: Is it true about decompiling programs written in .net?! Pin
BillWoodruff2-Sep-11 6:02
professionalBillWoodruff2-Sep-11 6:02 
GeneralRe: Is it true about decompiling programs written in .net?! Pin
PIEBALDconsult2-Sep-11 13:56
mvePIEBALDconsult2-Sep-11 13:56 
GeneralRe: Is it true about decompiling programs written in .net?! Pin
harold aptroot2-Sep-11 6:57
harold aptroot2-Sep-11 6:57 
AnswerRe: Is it true about decompiling programs written in .net?! Pin
BobJanova5-Sep-11 0:43
BobJanova5-Sep-11 0:43 
RantI take exception to the way Visual Studio 2010 handles exceptions Pin
Columbus-MCSD2-Sep-11 0:04
Columbus-MCSD2-Sep-11 0:04 
This is a gripe and a question, maybe someone can help me

Problem Scenario:

I just upgraded to Visual Studio 2010 Professional. I noticed some wierd things happening and after troubleshooting came up with this scenario

Create a C# Windows Form Application in Visual Studio 2005 Professional
Create a C# Windows Form Application in Visual Studio 2010 Professional

Identical code in each

C#
namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            //throw new Exception("test");
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //throw new Exception("test");
        }
    }
}


Visual Studio 2005
uncomment the 'throw' statement in the Form1 constructor. Visual Studio will report the exception and halt the code.
uncomment the 'throw' statement in the Form1_Load event handler. Visual Studio will report the exception and halt the code

Visual Studio 2010
uncomment the 'throw' statement in the Form1 constructor. Visual Studio will report the exception and halt the code.
uncomment the 'throw' statement in the Form1_Load event handler. Visual Studio silently aborts the method and continues running the code



This means that, in VS2010, in order to stop on , for example, a System.NullReferenceException that I threw, I have to check the "Thrown" box in the Exceptions configuration (cntrl+shift+E). Doing this causes it to stop on *every* System.NullReferenceException, even ones that are swallowed by a try/catch block.

I want VS2010 to act like 2005. Halt on any Exception that isn't explicitly delt with by a try/catch block, even Exceptions that I throw myself.

I don't get why it will halt on an explicit throw in the Forms constructor, but silently abort the method when thrown in the event handler. I find myself constantly reconfiguring the Exceptions config screen when something unexpected occurs (usually when an exception happens that I don't know about)

Am I doing something wrong or is this just something I need to adapt to?
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Rob Philpott2-Sep-11 0:41
Rob Philpott2-Sep-11 0:41 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Columbus-MCSD2-Sep-11 0:55
Columbus-MCSD2-Sep-11 0:55 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Shameel2-Sep-11 2:29
professionalShameel2-Sep-11 2:29 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Columbus-MCSD2-Sep-11 2:51
Columbus-MCSD2-Sep-11 2:51 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Shameel2-Sep-11 3:10
professionalShameel2-Sep-11 3:10 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Bernhard Hiller2-Sep-11 5:00
Bernhard Hiller2-Sep-11 5:00 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Luc Pattyn2-Sep-11 6:20
sitebuilderLuc Pattyn2-Sep-11 6:20 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
Columbus-MCSD2-Sep-11 14:02
Columbus-MCSD2-Sep-11 14:02 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
MicroVirus3-Sep-11 18:15
MicroVirus3-Sep-11 18:15 
QuestionTextbox properties Pin
vanikanc1-Sep-11 15:43
vanikanc1-Sep-11 15:43 
AnswerRe: Textbox properties Pin
Dave Kreskowiak1-Sep-11 16:59
mveDave Kreskowiak1-Sep-11 16:59 
QuestionC#.net- two ways to access active directory code Pin
dcof1-Sep-11 12:19
dcof1-Sep-11 12:19 
AnswerRe: C#.net- two ways to access active directory code Pin
Dave Kreskowiak1-Sep-11 16:54
mveDave Kreskowiak1-Sep-11 16:54 
GeneralRe: C#.net- two ways to access active directory code Pin
dcof2-Sep-11 4:38
dcof2-Sep-11 4:38 
GeneralRe: C#.net- two ways to access active directory code Pin
Dave Kreskowiak2-Sep-11 11:16
mveDave Kreskowiak2-Sep-11 11:16 
QuestionC#.net error obtained from sql server Pin
dcof1-Sep-11 6:42
dcof1-Sep-11 6:42 
AnswerRe: C#.net error obtained from sql server Pin
Dave Kreskowiak1-Sep-11 7:47
mveDave Kreskowiak1-Sep-11 7:47 

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.