While nesting in do-while

  • Thread starter Thread starter Tom Kent
  • Start date Start date
T

Tom Kent

I'm running into a weird circumstance with Visual Studio 7.1, where it
will not properly indent a while loop nested inside a do-while loop. It
compiles and runs fine, but the automatic indenting messes it up every
time.

Here's an example:

using System;
namespace Do_While_Test
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
int counter1 = 0;
int counter2 = 0;

do
{
Console.WriteLine("Counter is: {0}", counter1);
Console.WriteLine("Counting down:");
counter2 = 4;
while(counter2 > 0)
{
--counter2;
Console.WriteLine("{0}", counter2);
}
++counter1;

}while(counter1 < 4);
}
}
}


Note the while in the middle is only indented to the same level as the
do and its { }'s...it should have gone to the level of the
Console.Writelines.

If your viewer messes up indenting, check out the file:
http://teeks99x.teeks99.com/test.cs

Tom
 
Hi Tom,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the while block is indenting
incorrectly in VS.NET text editor. If there is any misunderstanding, please
feel free to let me know.

I have tried it on my machine and successfully reproed it. Currently, I'm
contacting the corresponding team on this issue and will update you as soon
as they give me any feedback.

Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Tom,

I have confirmed this as a known issue in VS.NET 2003. It will be fixed in
the next version of VS.NET. Thank you very much for your feedback!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
(e-mail address removed) (Kevin Yu [MSFT]) wrote in
Hi Tom,

I have confirmed this as a known issue in VS.NET 2003. It will be
fixed in the next version of VS.NET. Thank you very much for your
feedback!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

There aren't any bug fixes or anything for VS.NET 2003? Is there going to
be some way to get this bug fixed without buying a new copy?!?
Tom
 
Hi Tom,

To get a hotfix, I think this can be done quickly and effectively with
direct assistance from a Microsoft Support Professional through Microsoft
Product Support Services. You can contact Microsoft Product Support
directly to discuss additional support options you may have available, by
contacting us at 1-(800)936-5800 or by choosing one of the options listed
at http://support.microsoft.com/default.aspx?scid=sz;en-us;top. If this is
a bug, they will help you free of charge.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top