DateTime problem

G

Guest

(.net 2.0) Why is it that a DateTime's intellisense shows "Now" as a property
when not in a control structure, but if I declare a new instance within an
if{} block it doesnt support "now"?
Thanks, Mark

DateTime x1 = DateTime.Now; // correctly appears

if (true)
{
DateTime x2 = DateTime.Now; // this doesnt happen
}
 
N

Nicholas Paldino [.NET/C# MVP]

Shows up fine for me. Can you reproduce this every time?
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

I see no problem here , are you sure you are copying verbatim your problem
code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top