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/subscripti...ult.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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.