Problem with Debug.Assert

Brady Kelly <[email protected]> Wed, 28 May 2008 22:15:46 +0200
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
When I run the following code in the IDE, under the Debug configuration,
when I choose Retry on the dialogue presented by the assert, I get a message
that no source code is available for the current location.  Can anyone
enlighten me as to why VS2008 cannot see the obviously available code at
that location?

            string ns = null;
            // -- Missing code or operation to initialise ns should be here.

            // I only want to stop processing here when debugging.
            Debug.Assert(ns != null, "Whoops!  ns is null");
            if (ns == null)
            {
                Trace.WriteLine("Cannot print ns because ns is null");
            }
            else
            {
                Console.WriteLine("ns = {0}", ns);
            }




===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com