chris

chris

  • NA
  • 9
  • 0

defining variables - need the details on this one.

Oct 4 2007 9:30 AM

First, my background is vb/vb.net.  Only recently has I dove into c#.net 2005.

My understanding is when declaring a variable, i need to initialize it such as:

int MyCount;

MyCount = 0;

Where I'm confused is if this is a best practice:

int MyCount = 0;

If not, then why?  Seems I can do everything on one line instead of two is better.


Answers (1)