Original Post
Hi I was wondering if anyone could give the cons and pros of doing as in the following two examples. If I always create a new empty List ( or some other object/value ) does it at all have an impact if the declaration is done as instead of doing If both methods are alright when should the one be used over the other? does it matter? Thanks!
class Some
{
List<whatever> aList = new List<whatever>();
public Some()
{}
}
class Some
{
List<whatever> aList;
public Some()
{
aList = new List<whatever>();
}
}