Re: Throwing exceptions problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi J055,

Since you provided 2 separate code snippets of your project, it is hard for
the community to image the relationship between them, so it is almost
impossible for us to judge if your second reply has anything to do with
first AddAccount() method issue.

Let's focus on your first AddAccount() exception issue first.

To find out why the AddAccount() will return a null reference to the
calling procedure, the simplest way is placing a breakpoint in the
AddAccount() method and run your code under debugger. Then you can use F10
to step through each statement in this method, it should be easy to find
out which statement finally caused the method to exit and why null
reference is returned.

Based on my experience, I suspect the ArgumentOutOfRangeException is not
thrown. Because if the ArgumentOutOfRangeException is thrown, the
AddAccount() method will terminate execution immediately and it will not
return anything to the calling procedure.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: How do I Sleep for a specified amount of time and relinquish c
    ... Finally, the Windows thread scheduling is not a trivial topic, it is ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)
  • Re: Executing a method in a given thread context
    ... normally runs Elapsed event in another non-UI thread, however, it provided ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Creating directories on Vista machines using .NET
    ... "Windows Vista User Account Control Internals" ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)
  • RE: Intellisense not types for variable assignment (VB.NET)
    ... I was at the MSDN event where they were showing .net 3 communication ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.ide)
  • Re: Culling by suffocation
    ... >>>you explain you don't mean EEC as the community most of them will ... We've done a few freebies for farmers, ... said you do if you have other priorities at the time, you merely support ... money people in agriculture didn't even ...
    (uk.business.agriculture)